NameCharger VIP Member VIP ★ 15 ★ Impact 24 Nov 21, 2009 400 views 2 replies #1 Hi, I want to display a div if the user has javascript enabled and display nothing if javascript is disabled. Any help is greatly appreciated. Thanks!
Hi, I want to display a div if the user has javascript enabled and display nothing if javascript is disabled. Any help is greatly appreciated. Thanks!
tristanperry Domainer & Web/Software DevVIP Member VIP Trusted Contest Holder ★ 15 ★ Impact 72 Nov 21, 2009 1 point #2 I think that that'd be simply: Code: <script type="text/javascript"> document.write('<div>JavaScript is enabled, hence why you are seeing this.</div>'); </script> <noscript> </noscript> The <noscript> tags aren't necessarily needed; feel free to remove them.
I think that that'd be simply: Code: <script type="text/javascript"> document.write('<div>JavaScript is enabled, hence why you are seeing this.</div>'); </script> <noscript> </noscript> The <noscript> tags aren't necessarily needed; feel free to remove them.
NameCharger VIP Member VIP ★ 15 ★ Impact 24 Nov 21, 2009 #3 Worked perfectly. Thanks! Rep + NP$ sent.