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

Q663 How can I load a document into a new window from a link, if the browser supports javascript, and into the current window if it doesn't?

You are here: irt.org | FAQ | JavaScript | Window | Q663 [ previous next ]

Try:

<SCRIPT LANGUAGE="JavaScript"><!--
function myOpen(url) {
    windowHandle = window.open(url,'windowName','width=200,height=200');
}
//--></SCRIPT>

<A HREF="filename.htm" onClick="this.href='javascript:myOpen(\'filename.htm\')'">Open</A>

©2018 Martin Webb