Why doesn't this work?
Is there something missing? I can't see any ommisions.
thanks
xdef
<html>
<head>
<title>Objects, methods and events.</title>
</head>
<body bgcolor="#333333">
<script language="JavaScript">
<!-- hide
var user=prompt("Hello! What is your name?");
var outputString="Nice to meet you "+user+"! Welcome to my page";
alert(outputString);
var silvervar="silver"
var whitevar="white"
var resetvar="#cccc99"
document.write("<form><input type='button' value='http://www.webdeveloper.com/forum/archive/index.php/Silver' onClick=eval('document.bgColor='silvervar')></form>");
document.write("<form><input type='button' value='http://www.webdeveloper.com/forum/archive/index.php/White' onClick=eval('document.bgColor='whitevar')></form>");
document.write("<form><input type='button' value='http://www.webdeveloper.com/forum/archive/index.php/reset' onClick=eval('document.bgColor='resetvar')></form>");
//close hide -->
</script>
</body>
</html>
Is there something missing? I can't see any ommisions.
thanks
xdef
<html>
<head>
<title>Objects, methods and events.</title>
</head>
<body bgcolor="#333333">
<script language="JavaScript">
<!-- hide
var user=prompt("Hello! What is your name?");
var outputString="Nice to meet you "+user+"! Welcome to my page";
alert(outputString);
var silvervar="silver"
var whitevar="white"
var resetvar="#cccc99"
document.write("<form><input type='button' value='http://www.webdeveloper.com/forum/archive/index.php/Silver' onClick=eval('document.bgColor='silvervar')></form>");
document.write("<form><input type='button' value='http://www.webdeveloper.com/forum/archive/index.php/White' onClick=eval('document.bgColor='whitevar')></form>");
document.write("<form><input type='button' value='http://www.webdeveloper.com/forum/archive/index.php/reset' onClick=eval('document.bgColor='resetvar')></form>");
//close hide -->
</script>
</body>
</html>