Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alert box does not disppear in Netscape

Status
Not open for further replies.

lsyhu

Programmer
Apr 27, 2002
12
US
Hi,

I am maintaing an application which uses perl as the web language. On Netscape 4.7 (not IE) if the Date text field is entered incorrectly, the alert box never disappears when you click OK. The htm coe generated by perl is similar to the below. When I run the pure html code on Netscapde, no problem at all. How to solve this problem? Thanks a lot

Lisa

------------------
<head>

<html>

<script language=&quot;javascript&quot;>
function validDate( dateStr )
{
var datePattern = /[0-9]{1,2}-[a-zA-Z]{3}-[0-9]{4}/;

if ( dateStr != &quot;&quot; ){
if (!datePattern.test(dateStr))
alert(&quot;Invalid date format. Format required is DD-MON-YYYY.&quot;);
}
}
</script>
</head>

<body>
<table>
<form name=form1 action=a.html>
<TR>
<td class=&quot;reqFont&quot; align=&quot;left&quot; width=&quot;100&quot; height=&quot;30&quot;>
<b>Requested Completion Date</b>
</td>
<td class=&quot;reqFont&quot; height=&quot;30&quot; align=&quot;left&quot; width=&quot;100&quot;>
<input type=&quot;text&quot; name=&quot;DATE&quot; value=&quot;&quot; onBlur=&quot;validDate(this.value)&quot;>
<a href=&quot;#&quot; onClick=&quot;window.dateField=document.reqTabForm.DATE;calendar=window.open('../html/calendarWin.htm', 'cal', 'width=200,height=250,top=' + dialogHeight + ',left=' + dialogWidth); return false&quot; tabindex=&quot;-1&quot;><img src=&quot;../images/calendarbutton.gif&quot; border=0 width=&quot;20&quot; height=&quot;20&quot; alt=&quot;Date format: DD-MON-YYYY
(example: 01-JAN-2002)&quot;>
</a>
</td>
</TR>

<TR>
<td class=&quot;reqFont&quot; align=&quot;left&quot; width=&quot;100&quot; height=&quot;30&quot;>
<b>hh</b>
</td>
<td width=&quot;30&quot; height=&quot;30&quot;>
hh <input type=&quot;text&quot; name=&quot;TO_TEST_TITLE&quot; size=&quot;46&quot; maxlength=&quot;46&quot; value=&quot;&quot;>
</td>
</TR>

</form>
</table>
</body>

</html>
-----------------------

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top