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

Q553 How can I use the replace method on a normal text link?

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

Try:

<script language="JavaScript"><!--
function go(url) {
    if (document.images)
        location.replace(url);
    else;
        location.href = url;
}
//--></script>

<a href="http://www.irt.org/" onClick="this.href='javascript:go(\'http://www.irt/org\')'">irt.org</a>

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

©2018 Martin Webb