chronister Posted January 7, 2007 Share Posted January 7, 2007 Hi All,I am completely ignorant of javascript and most of my javascript codes come from the free code sites. One day when I have the time and patience I will actually learn this stuff, until then I need your expertise to figure out how to check if javascript is enabled in a users browser and if it is not, then display a message.I found the JavaScriptEnabled property and have not had much luck with figuring out exactly how to use it. An hour on Google produced nothing usable for me.I found this, and it is not working for me... Any help or suggestions?? [code]<script><!--if (JavaScriptEnabled = 'No') { document.write("You Must Have Javascript Enabled to use this site.");}//--></script>[/code]Thanks in advance.Nate Quote Link to comment Share on other sites More sharing options...
paul2463 Posted January 7, 2007 Share Posted January 7, 2007 Better to have the default page be the one that works when JavaScript is disabled.That way you can have it redirect to a JavaScript-rich page when JavaScript is enabled.<script type="text/javascript"><!--//self.location.href = "withscript.htm";//--></script><noscript><p>This page is for JavaScript-disabled clients.</p></noscript> Quote Link to comment Share on other sites More sharing options...
fenway Posted January 7, 2007 Share Posted January 7, 2007 You can use JS to see if JS is enabled... there's a noscript tag, though. Quote Link to comment Share on other sites More sharing options...
chronister Posted January 7, 2007 Author Share Posted January 7, 2007 I feel dumb now... lolI actually do know about the <noscript> tag, an that should have been my first item I tried...... Thanks folks.I have a site that has js navigation and no alternative, its a family tree site, so its not used by lots and lots of people.... I will simply place a noscript tag in there in case anyone in my family has it disabled.Thanks, 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.