Redirect Problem in IE
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Redirect Problem in IE

From: Ray <RayBrack@HardLogic.com.au>
Date: Mon Jan 23 2006 - 01:39:30 CET

I have a function which accepts a page name and ID and redirects the
user to the specified page. The function works in Netscape and Firefox
but IE. The code I am using is;

function displayPage(page,id)
{
    /*
    alert("Page: "+page)
    alert("ID: "+id)
    */

    // Set the cookie so the truck page knows which truck to display...
    expireDate = new Date;
    document.cookie="Truck="+id+";expires="+expireDate;

    // Display the page...
    window.location.href=page;
    return false;
}

I have used various combinations of the location method including;
window.location=page;
window.location.href=page;
window.navigate=page;
document.location=page;
document.location.href=page;
location=page;
location.href=page;

Can anyone help?
Received on Tue Feb 7 21:18:36 2006