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

Q677 How can I open a popup window, or a new window if javascript is not enabled/supported?

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

Using <NOSCRIPT> doesn't help you out in this situation as the only way to open a new window using JavaScript, is by using JavaScript (QED). If you really want robust code then you'd have to change your code from something like:

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

<A HREF="javascript:myopen('nextpage.htm')">Open Next Page</A>

To:

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

<A HREF="nextpage.htm" TARGET="windowName" onClick="myopen('nextpage.htm');return false">Open Next Page</A>

Feedback on 'Q677 How can I open a popup window, or a new window if javascript is not enabled/supported?'

©2018 Martin Webb