PDA

View Full Version : error on onclick



joecool2005
11-23-2005, 05:35 PM
Hi,

The "onClick" it shows me an error. Can you tell me why?

function draw(drawForm){
if(drawForm)
document.write("<INPUT type=\"text\" name=text1 ><a href='#' onClick=draw(false)><IMG src=\"fleur_de_lis.gif\"></a>");
else
alert("false");

}

Thanks
Joe

Twey
11-23-2005, 05:54 PM
Surround the onclick event with quotes.