...

View Full Version : Javascript not working in NN



chelvis
07-29-2002, 08:42 PM
I have pasted the javascript below. I wrote a validation when you click on the search image. The validation is working in IE. But not in NN. How can I solve this?

<html>
<head>
<title>SOme</title>
<script language="JavaScript">
function validate(recallsearch) {
radioselect = false;
for (counter=0; counter<recallsearch.radio_rec.length; counter++) {
if (recallsearch.radio_rec[counter].checked)
radioselect=true;
}
if (!radioselect) {
alert('There arev No items selected for processing. Please select items before search.');

}

}
</script>

</head>

<body bgcolor="#FFFFFF" topmargin="0" marginheight="0" marginwidth="0">
<form name="recallsearch">
<table border="0" width="450" cellspacing="0" cellpadding="1" bgcolor="#000000">
<tr><td valign="top">
<table border="0" width="449" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr><td valign="top">&nbsp; </td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText"><b>Num.</b></td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText"><b>Search Expression</b></td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText"><b>Modified</b></td></tr>
<tr><td valign="top" height="1" bgcolor="#000000" colspan="9"><img src="images/spacer.gif" border="0" height="1"></td></tr>
<tr><td valign="top"><input type="radio" name="radio_rec" value="1"></td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText">1</td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top"><A CLASS="BlackText">($oil AND ($exxon) AND ($fields))</td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText">12-Jul-02</td></tr>
<tr><td valign="top"><input type="radio" name="radio_rec" value="2"></td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText">2</td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top"><A CLASS="BlackText">($oil AND ($aramco) AND ($oil reserve))</td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText">19-Jul-02</td></tr>
<tr><td valign="top"><input type="radio" name="radio_rec" value="3"></td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText">3</td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top"><A CLASS="BlackText">($oil)</td><td valign="top" width="1" bgcolor="#000000"><img src="images/spacer.gif" border="0" width="1"></td><td valign="top" align="middle"><A CLASS="BlackText">12-Jul-02</td></tr>
</td></tr>
</table>
</td></tr>
</table>

</td></tr>
<tr><td valign="top" height="10"><img src="images/spacer.gif" border="0" height="10"></td></tr>
<tr><td valign="top"><a href="javascript:validate()"><img src="images/search_orange.gif" border="0" type="image"></a>&nbsp; &nbsp; <img src="images/delete_orange.gif" border-"0"></td></tr>
</table>
</form></body>
</html>

adios
07-29-2002, 08:47 PM
Try:

<tr><td valign="top"><a href="javascript&#58;validate(document.recallsearch)"><img

chelvis
07-29-2002, 08:58 PM
Thanks adios it worked:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum