Debt Consolidation - Debt Consolidation - Kamala Harris - Funbrain - Wordpress Theme

PDA

View Full Version : check if Javascript is enabled and act accordingly


ktsirig
Apr 11th 2006, 1:31 pm
Hi,
I want to add a couple of pop-up boxes in my page, and I want to know :
1) is there a small piece of code that I must paste in my page which will check to see if the client has JS enabled?
2) do I use the <noscript> tag to enter the page that the user with no JS enabled will see?
3) if a user has JS enabled, do I need to check also if there are pop-up blockers, or it will be ok and my pop-up will open with no problem?

What I want basically is:
I have a link in the page ,which, if JS is enabled will open in a pop-up window when the user clicks on it, whereas, if JS is disabled, it will open in a new page, like plain, ordinary links

Thanks in advance

Slapyo
Apr 12th 2006, 8:31 am
Just have the javascript with some <noscript> tags for people who don't have it turned on. I am not sure if you can check for blockers, but you may or may not have problems with pop-ups from javascript.

exam
Apr 17th 2006, 5:54 pm
Try something like this: make sure your popup function returns false.
<a href="popup_alternative_page.html" onclick="do_the_popup();">Somethign</a>