I have one sub webpage which is called from various other web pages which I would like the text on a button to
change according to the language the main
webpage – ie button text = close, fermer etc. I have defined a function to work out the text to put on the button
called getCloseText() but how can I call this from within the html input markup?
The code i have is below (simplified).
Any help appreciated
regards Bob (novice at javascripting)
<html>
<head>
<title>Bedroom</title>
<script type=”text/javascript” language=”JavaScript”>
<!–
function closeWin() {
myWin= close(“no.htm”, “displayWindow”, “width=600,height=400,status=no,toolbar=no,menubar=no”);
}
function getCloseText() {
return (“f e r m e r “);
}
–>
</script>
</head>
<body>
<img style=”padding-bottom: 10px” src=”../img/bedroom1-m.jpg” alt=”Photograph of Bedroom 1″ />
<input type=”button” value=”getCloseText()” onclick=”closeWin()” />
</body>
</html>