PDA

View Full Version : javascript code not work in firefox



rushiags
01-08-2009, 11:20 AM
This code is basically for popup the calender it works properly in IE:) but not works in Fire Fox..:mad:

cal.html

<head>
<script language="javascript" src="date/popcalendar.js"></script>
</head>
<body>
<input type="text" name="arrival" value="<?=$arrival;?>" size="20" style="width:100px" class="inputBox"/>
<script type="text/javascript" language="javascript">

if(!document.layers) {
document.write('<a href="Javascript:void(0);" onclick="popUpCalendar(SearchForm.arrival,SearchForm.arrival, SearchForm.departure, \'yyyy-mm-dd\');"><img src="date/cal.gif" border="0" align="absmiddle" alt="Change Date"></a>');
}
</script>
</body>

popcalendar.js
I have uploaded the file with this thread..

jscheuer1
01-08-2009, 03:14 PM
There were several errors in popcalendar.js as far as javascript and most modern browsers go, though if this script is as old as I think it is, it really isn't that bad at all. Here attached is a version that works in FF, IE, probably all modern browsers:

2414