Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q177 How can I use the location replace method without causing problems in browsers that do not support it?

irt.org | Knowledge Base | JavaScript | Link | Q177 [ previous next ]

Q177 How can I use the location replace method without causing problems in browsers that do not support it?

<SCRIPT LANGUAGE="JavaScript"><!--
if (document.images)
    location.replace("http://www.somewhere.com/new_page.html");
else
    location.href = "new_page.html";
//--></SCRIPT>

Note: in Opera replace() will work, but only with absolute URL's.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.