www.webdeveloper.com
Results 1 to 5 of 5

Thread: This code does NOT work in Mozilla / FireFox

  1. #1
    Join Date
    Jun 2004
    Location
    San Juan - Argentina
    Posts
    6

    This code does NOT work in Mozilla / FireFox

    Hi guys...
    I'm having trouble with some code i made for a website.
    This code works perfect in IE, but it does not work in Mozilla.

    I have a list of cities, when i click one city it should do:
    1 Set a cookie (which uses cookies.js i attached)
    2 open website parameter in corner frame
    3 redirect to the city's url. the city's url will open in the same frame where cities list is loaded

    Code:
    <SCRIPT language=JavaScript type=text/JavaScript>
    function redirect(location_url)	{  
    return window.location.href=location_url;
    }
    
    function openlink(website,ctienda) {
      setCookie("sucursal", ctienda, 365, '/'); 
       window.open(website,"corner");
       var url2go = 'http://www.website.com/c/'+ctienda+'/'+ctienda+'.htm'; 
        redirect(url2go); 
    }
    </SCRIPT>
    
    <-- now the list of cities located in body...
    
    <a href="#" onclick="JavaScript:openlink('http://www.website.com/c/1/city1.htm','1');">CITY1 <br /></a>
    <a href="#" onclick="JavaScript:openlink('http://www.website.com/c/2/city2.htm','2');">CITY2 <br /></a>
    <a href="#" onclick="JavaScript:openlink('http://www.website.com/c/3/city3.htm','3');">CITY3 <br /></a>
    Any Firefox's JS expert here ?
    Thanks a lot in advance.
    Attached Files Attached Files
    Henry Becerra
    Web & Systems solutions | www.beza.com.ar
    ICQ: 18048153
    MSN: qbecerra@hotmail.com
    San Juan - Argentina

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Appears to work correctly; document.cookie gives the correct value.

  3. #3
    Join Date
    Jun 2004
    Location
    San Juan - Argentina
    Posts
    6
    incredible:
    this change made it work...

    Code:
    <script language="JavaScript" src="cookies.js" type="text/jscript"></script>
    by

    Code:
    <script language="JavaScript" src="cookies.js" type="text/javascript"></script>
    this line
    Code:
    <script language="JavaScript" src="cookies.js" type="text/jscript"></script>
    works perfect in IE but not in Mozilla...

    Henry Becerra
    Web & Systems solutions | www.beza.com.ar
    ICQ: 18048153
    MSN: qbecerra@hotmail.com
    San Juan - Argentina

  4. #4
    Join Date
    Jul 2004
    Posts
    986

  5. #5
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    To validate the line should be:
    Code:
    <script type="text/javascript" src="cookies.js"></script>
    As Willy wrote, don't cross post in different forums, nor in different forum sites.

    If you require further assistance, the complete page or link is needed and what exactly does not work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles