...

View Full Version : Going to a "no Javascript" page after pop-up



name _F1
10-23-2006, 12:41 PM
A page in my website requires a full-screen pop-up. Is the following method a reliable way of redirecting the user to a page where they are informed that Javascript is needed, or is there a better way?


<!--Link to pop-up-->
<a href="/nojavascript.php" onclick="window.open('/pop-up.php','_blank')">Open</a>

Striker14537
10-23-2006, 12:50 PM
I can help ^^

<head>
<noscript>
<meta http-equiv="refresh" content="0;url=pop-up.php">
</noscript>
<head>

Bill Posters
10-23-2006, 01:28 PM
<meta http-equiv="refresh" content="0;url=pop-up.php">

Fwiw, Google frowns upon 0 length meta redirects, due to their popularity amongst spammers and other shysters.

Using noscript elements in the head section will also invalidate the document, at least under some doctypes.


<a href="/nojavascript.php" onclick="window.open('/pop-up.php','_blank'); return false;">Open</a>

Remember to add return false to prevent the main window from going to the non-js page as well.


You should consider whether or not js is really necessary for viewing the content in the new window? It may be important to those who don't, won't or can't use js.

name _F1
10-23-2006, 03:56 PM
Yeah, I forgot the return false. So that is a reliable method for adding a non-Javascript page?

Yes, the content is strictly Javascript required. ;) If the user has Javascript disabled, then the page really doesn't apply to them anyway.

Bill Posters
10-23-2006, 05:02 PM
Yeah, I forgot the return false. So that is a reliable method for adding a non-Javascript page?

Yes, the content is strictly Javascript required. ;) If the user has Javascript disabled, then the page really doesn't apply to them anyway.

The method you're currently using is effective, though could be improved upon.
Imho, a better option might be to use js to add the link to the page.
Those with js get (access to) the additional info, whilst those without aren't offered a link which is of no use to them.

Alternatively, you could add some text telling users that js is required for certain info and then use js to turn that text into a link to that extra info.
Non-js users get the message, whilst js users get the link to the info.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum