Gossamer Forum
Home : General : Internet Technologies :

Javascript Browser - if enabled, stay...if not, redirect

Quote Reply
Javascript Browser - if enabled, stay...if not, redirect
Hi All

I've seen lots of javascript redirect scripts. All the ones that I've seen first check for javascript and then redirect you to the right page.

What I want to do is first detect javascript and then STAY on that page if javascript is enabled, but get redirected only if it is not enabled.

I don't want to redirect away from the home page if they have javascript enabled.

I have other javascripts that I would want to utilize on the home page for such things as style sheets, etc.

Would anyone know of any script like this?

Many thanks. Smile

------------------------------------------
military dog tags for personal identification, travel, and many other uses
Quote Reply
Re: [DogTags] Javascript Browser - if enabled, stay...if not, redirect In reply to
Try putting this in the <head> section of the page (it should redirect after 1 second if the user doesn't have javascript enabled, otherwise it should remain on the page):
Code:
<noscript>
<meta http-equiv="refresh" content="1;url=http://www.example.com">
</noscript>

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund

Last edited by:

hennagaijin: Dec 8, 2002, 4:30 PM
Quote Reply
Re: [hennagaijin] Javascript Browser - if enabled, stay...if not, redirect In reply to
He wanted it to be dependant on if Javascript is enabled Wink

Try: http://www.google.com/...f+javascript+enabled Wink

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

Last edited by:

Andy: Dec 9, 2002, 3:15 AM
Quote Reply
Re: [Andy] Javascript Browser - if enabled, stay...if not, redirect In reply to
That IS dependent on whether Javascript is enabled. If javascript is disabled, the browser reads the meta redirect tag between the <noscript> tags. If javascript is enabled, it doesn't, and you stay on the same page. That's what he asked for, I thought. Am I missing something??

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Javascript Browser - if enabled, stay...if not, redirect In reply to
Thanks, both.

Yes, I think that the noscript piece is what I'm looking for. Thanks, hennagaijin Smile

------------------------------------------
military dog tags for personal identification, travel, and many other uses