Hi to all,
I have one action
servlet,
i print two lines like
html+="& lt;script language=\"javascript\"& gt;function validate(){alert(\"inside check\");}& lt;/script& gt;";
html+="& lt;input type=\"button\" value=\"submit\" onclic=\"validate()\"& gt;";
1.one javascript function named as validate()
2.another one is button and onclick validate function defined above.
and printed.
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println(html);
out.flush();
When i click the button, i get one error, like validate is not defined.
Why?
Please rectify this problem. Thanks
[ September 15, 2006: Message edited by: edward durai ]