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

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?

irt.org | Knowledge Base | JavaScript | Window | Q663 [ previous next ]

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?

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>

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.