Jump to content

Javascript detection


ranjithch

Recommended Posts

Hi ,I have a web application which will be running thru several browsers. How can i find out whether the javascipt is enabled or not?I have to alert the user, if their browser is not javascript enabled?Please have a look at this issue and request you to help me on this..Thanks in advance..

Link to comment
Share on other sites

1) I don't think it does run with all old browsers2) depends on what version u are using ie 1.23) people can switch it offsolution: use the noscript tag to display a message to people not seeing javascript<body><script type="text/javascript"><!--document.write("Hello World!")//--></script><noscript>Your browser does not support JavaScript!</noscript></body>

Link to comment
Share on other sites

Well scott,that is a nice answer. Thanks for that. I have already had an idea to use <noscript> tag and it serves the purpose. Thank you.Is there any way we can check the javascript enabling with navigator object or with some other object...

1) I don't think it does run with all old browsers2) depends on what version u are using ie 1.23) people can switch it offsolution: use the noscript tag to display a message to people not seeing javascript<body><script type="text/javascript"><!--document.write("Hello World!")//--></script><noscript>Your browser does not support JavaScript!</noscript></body>

Link to comment
Share on other sites

All modern browser should support JavScript but remeber theuser can turn JavaScript off so it is a good idea to warn them before entering or going to deep into your site that they need JavaScript enabled to get the most out of your site. :)

Link to comment
Share on other sites

Correct. Can anybody pls help me how to detect whether Javascript enabled or disabled in the browser? In Specific, If the browser turns off the javascript too?I just need to warn the user, if the javascript is disabled in his browser.... Pls help me with this issue.Thanks in advance...

All modern browser should support JavScript but remeber theuser can turn JavaScript off so it is a good idea to warn them before entering or going to deep into your site that they need JavaScript enabled to get the most out of your site. :)

Link to comment
Share on other sites

Is there any way we can check the javascript enabling with navigator object or with some other object...

To check the Navigator Object you need a browser that supports JavaScript, so if a browser doesn't support JavaScript you can't access that object... In any case i've had a look at the properties of that object and none include turning JavaScript on in any way. :( Say for example i had turned off JavaScript for a reason, then visited your site and it's turned back on without my say so, i wouldn't be happy with you interfering with my settings :) Plain and simple if you want to notify a user that they don't have JavaScript enabled you have to use the <noscript> tag, that's what it's there for :)
Link to comment
Share on other sites

To check the Navigator Object you need a browser that supports JavaScript, so if a browser doesn't support JavaScript you can't access that object...  In any case i've had a look at the properties of that object and none include turning JavaScript on in any way. :( Say for example i had turned off JavaScript for a reason, then visited your site and it's turned back on without my say so, i wouldn't be happy with you interfering with my settings :) Plain and simple if you want to notify a user that they don't have JavaScript enabled you have to use the <noscript> tag, that's what it's there for :)

Thanks scott. It is of a nice help provided. I will use that.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...