Check Browser Javascript enabled
JavaScript is a small, lightweight, object-oriented, cross-platform scripting language.JavaScript is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more.With some reasons the web browser don’t support Javascript ,like user intentially disables,some mobile browsers version don’t support.Then it must we check the whether user’s web browser has Javascript enabled.Here we discuss how to handle non Javascript browser.
We show a alert ,warning message if user browser don’t hav Javascript enabled.using <noscript> HTML tag. just add bellow code to any where in the body section.<noscript> element will be rendered by those Javascript disabled browsers.
1 | <noscript><font face=arial>JavaScript must be enabled in order for you to use maheshchari.com in standard view. However, it seems JavaScript is either disabled or not supported by your browser. To use standard view, enable JavaScript by changing your browser options, then <a href="">try again</a>. </font></noscript> |
We show a alert ,warning message with Javascript itself if user browser doesn’t support <noscript> HTML tag.below example code demonstrates.
1 2 3 4 5 | <div id="nojs"><font face=arial>JavaScript must be enabled in order for you to use maheshchari.com in standard view. However, it seems JavaScript is either disabled or not supported by your browser. To use standard view, enable JavaScript by changing your browser options, then <a href="">try again</a>.</font></div>
<script>
//if script enabled warning message hidden.
document.getElementById('nojs').style.display="none";
</script> |
We create seperate UI or seperate web site for those Javascript disabled browsers. below example redirects the user automatically if Javascript disabled.
1 2 3 4 5 6 7 8 | <html> <head> <noscript> <meta http-equiv="refresh" content="0;URL=http://mobile.maheshchari.com" /> </noscript> </head> <body></body> </html> |
Popularity: 35% [?]









Related Articles
2 users responded in this post
Sir,
I need to upload a 150 mb file in my server.But i cannot edit my php.ini file in the server. Can u help with the code.
Sudarsan
You can do it with help of .htaccess also.if you don’t have either permission,you need to ask your hosting provider to enable any one.
Leave A Reply