Computer Guy
asked on
How can I check to see if JavaScript is enabled, and if not display a message to the user: JS needs to be enabled
How can I check to see if JavaScript is enabled (when a page is loaded), and if not display a message to the user: JS needs to be enabled with a link (so I can have a page to say how to enabled javascript.
http://www.w3schools.com/TAGS/tag_noscript.asp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I usually like to put someting in the HTML that shows the message, and hide it through Javascript. This way, if javascript is enabled, the message is not shown, and if javascript isn't enabled, the message is shown.
<script>
function onLoadHide () //Fired on body onLoad event
{
document.getElementById("h ideMe").di splay = 'none';
}
</script>
.....
<div id="hideMe" >Javascript MUST be enabled</div>
<script>
function onLoadHide () //Fired on body onLoad event
{
document.getElementById("h
}
</script>
.....
<div id="hideMe" >Javascript MUST be enabled</div>
ASKER
How can I use the last example with <noscript>
<noscript> is not required in last example.