location.href working in ie but not workiin ff chrome safari
Posted: Sat Mar 26, 2011 10:25 pm
it seems the strange nature of script dialects between internet explorer and firefox etc has reared it's ugly head again. The document object model (DOM) is respected to load new documents onto the current location as such when there is previous javascript already evaluated before a reload or new load page call:
works in ie, but not in ff when inside of a function such as:
so to make it work in all browsers (03-2011) use this DOM style, declaring 'document' and 'replace'
Code: Select all
location.href="events_editor.php"
Code: Select all
//-----
function loadEvent(sID)
{
location.href("events_editor.php?id="+sID);
}
Code: Select all
//-----
function loadEvent(sID)
{
document.location.replace("events_editor.php?id="+sID);
}