I have this simple code, but it still gives an error. Could someone explain why ?
When the page loads, I see my Play button fine. When I click on it, IE tells me there is an error on the page and nothing happens.
What is the error ?
Pascal.
I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
Code:
<html>
<head>
<script language="javascript">
function init(){
document.write('<p><form id="userspace"><input type="button" onclick="play()" value="Play" /></form></p>');
}
function play(){
document.write('<p>Done</p>');
}
</script>
</head>
<body onload="init()">
</body>
</html>
When the page loads, I see my Play button fine. When I click on it, IE tells me there is an error on the page and nothing happens.
What is the error ?
Pascal.
I've got nothing to hide, and I'd very much like to keep that away from prying eyes.