Click to See Complete Forum and Search --> : Java script "Error on Page"


meenu24
05-06-2006, 10:34 PM
<html>
<body>
<script>
hformsub()
{
var al
try
{
document.form2.submit()
}
catch(err)
{
al=err.description
alert(al)
}
}

</script>
<form name="form2" action="index.jsp" >
<input type="text" id="htitle" name="keyword" value="default" >
</form>
<table>
<tr>
<td id="raw" onclick="hformsub()" >not correct</td>
</tr>
</table>
</body>
</html>

WHen I click the row with id=raw then I dont get the form submitted and I get error on page. Can anyone tll me what i missed. Thanks in advance

A1ien51
05-06-2006, 10:38 PM
helped if you declared your function. (aka you missed the word function before your function name in the script)

Eric

prakash
05-07-2006, 11:54 PM
u must add keyword 'function' before defining the function.