PDA

View Full Version : error on page?


Aymen++
03-06-2003, 04:34 PM
when i excute this code:

<HTML>
<HEAD>
<TITLE>javascript Punchline demo by Ray Daly</TITLE>
<SCRIPT LANGUAGE="LiveScript">
<!-- hide this script from some browsers
function Punchline () {
document.write ("<BODY BGcolor=#00EE00><P>
<I>To get to the other side.</P></I>") ;
}
// hidden ray.daly@mailcall.com 12/16/95-->
</SCRIPT>
</HEAD>
<BODY>
<H1>Punchline</H1>
<H2>a javascript Punchline demo by Ray Daly</H2>
<P>Why did the chicken cross the road?</P>
<FORM>
<P><INPUT TYPE="button" VALUE="Punchline" onClick=Punchline()>
</P>
</FORM>
</BODY>
</HTML>

the status bar will show me this message:
error on page
why?

Roy Sinclair
03-06-2003, 05:09 PM
Because you forgot to use quotes on this onClick=Punchline().