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??? Link to comment https://forums.phpfreaks.com/topic/61761-noscript/ 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. Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307500 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 Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307503 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> Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307504 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 Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307505 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> Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307506 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? Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307734 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. Link to comment https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307740 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.