Results 1 to 2 of 2

Thread: javascript code not work in firefox

  1. #1
    Join Date
    Dec 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default javascript code not work in firefox

    This code is basically for popup the calender it works properly in IE but not works in Fire Fox..

    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..

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Attachment 2414
    Last edited by jscheuer1; 01-08-2009 at 03:31 PM. Reason: minor bug fix, opera - probably other non ie or moz
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •