What's wrong with this?

    Date: 09/16/06 (Javascript Community)    Keywords: php

    I am trying to make a bookmark script to set a cookie for the current page, to be used by a PHP extension.  But it only partially works.
    location.reload() works, but history.go(0); doesn't.  What am I missing here? or is there any alternative to it?


    Note, this is written for me so compatibility/user-friendly isn't an issue.
    Further more this is the code before I cut out the comments, CRLF, and other extraneous white space.

    if(navigator.cookieEnabled)
    {
       var myKey = window.prompt("Session Key","Sentix");
       document.cookie = "XDEBUG_SESSION="+myKey; //Sets the XDEBUG cookie
       if(window.confirm("Ok = attempt soft reload/cancel = hard reload"))
       {
            history.go(0); //Try Soft reload
       }
       else
       {
            location.reload();//Hard reload
       }
           
    }else {
        alert("!navigator.cookieEnabled");
    }
    

    Source: http://community.livejournal.com/javascript/112586.html

« Worldbender Editor -... || ieHover.js question »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home