Does anyone have any sample code to check if Javascript is enabled on the users computer?
Thanks!
Printable View
Does anyone have any sample code to check if Javascript is enabled on the users computer?
Thanks!
Use the <noscript> tags.
Will give them a message whether or not they have JavaScript enabled.Code:<script language="JavaScript">
//Please enable JavaScript
<!--
document.print("JavaScript is enabled.");
-->
</script>
If they don't there's no way to do anything. You can't say "if(noJavaScript)" because the code wouldn't execute.