kurniawandie
01-30-2004, 12:28 AM
Hello Guys,
This is the first time I send a message in this forum. I am a newbie in javascript, so I am not sure if it is a bug, a limitation or just an incompatibility between IE and mozilla.
Below is the script from Internet and World Wide Web:How to program book. I modified some lines to identify the problem. It runs perfectly in Internet Explorer, but not in mozilla and netscape. I attached the javascript at the bottom of this message.
The javascript console gave 'functionA is not define'. However, when I delete line 5 'document.writeln("Hello")', it works in mozilla.
It would be very appreciated if you can help me with this problem.
Cheers,
Andie
***********************************************
<html>
<head>
<script language = "javascript">
function start()
{
document.writeln("Hello");
functionA();
document.writeln("Hello Again - It Works");
}
function functionA()
{
}
</script>
</head>
<body onload="start()">
</body>
</html>
***********************************************
This is the first time I send a message in this forum. I am a newbie in javascript, so I am not sure if it is a bug, a limitation or just an incompatibility between IE and mozilla.
Below is the script from Internet and World Wide Web:How to program book. I modified some lines to identify the problem. It runs perfectly in Internet Explorer, but not in mozilla and netscape. I attached the javascript at the bottom of this message.
The javascript console gave 'functionA is not define'. However, when I delete line 5 'document.writeln("Hello")', it works in mozilla.
It would be very appreciated if you can help me with this problem.
Cheers,
Andie
***********************************************
<html>
<head>
<script language = "javascript">
function start()
{
document.writeln("Hello");
functionA();
document.writeln("Hello Again - It Works");
}
function functionA()
{
}
</script>
</head>
<body onload="start()">
</body>
</html>
***********************************************