The Little Guy Posted July 25, 2007 Share Posted July 25, 2007 if I were to use the <noscript></noscript> tags, is there a way using php to check if the info between this ran? basically I have JavaScript built into my site, and for the site to work it MUST have JavaScript enabled. If it is not enabled, I would like to hult the loading of the page, and just say JavaScript must be enabled to view the page. any way to do this??? Quote Link to comment Share on other sites More sharing options...
Aureole Posted July 25, 2007 Share Posted July 25, 2007 I need to do something similar...if Javascript is disabled then redirect the user to a different page... Come to think of it, I just had an idea as I was posting this... <noscript> <?php header('location: nojs.php'); ?> </noscript> Not sure if that's exactly what you're looking for though. Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 25, 2007 Share Posted July 25, 2007 wouldnt be better to get the users info from the browser to see if javascript is enabled Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted July 25, 2007 Author Share Posted July 25, 2007 Which one is better??? <noscript> <?php header location("nojs.php"); ?> </noscript> does this work? or will it actually do the refresh no matter what?? This one works for sure (except for IE i just realized): <noscript> <meta http-equiv="refresh" content="0;url=http://mysize.com/nojs.php"> </noscript> Quote Link to comment Share on other sites More sharing options...
Aureole Posted July 25, 2007 Share Posted July 25, 2007 I have no idea if it will work, I will test it real quick on my site, give me a second. And meta refresh sucks. =P Quote Link to comment Share on other sites More sharing options...
Aureole Posted July 25, 2007 Share Posted July 25, 2007 This redirects you whether you have JS enabled or disabled...so that rules that out, oh well I tried. <noscript> <?php header('location: nojs.php'); ?> </noscript> Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted July 26, 2007 Author Share Posted July 26, 2007 any other Ideas that work in FF, and IE? Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 26, 2007 Share Posted July 26, 2007 noscript is there to prompt a user with a message i told u to use the browser info ok. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.