Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Link | Q177 [ previous next ]

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

©2018 Martin Webb