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