ranjithch Posted January 25, 2006 Share Posted January 25, 2006 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 More sharing options...
smiles Posted January 25, 2006 Share Posted January 25, 2006 Javascript runs with all browser , I think so Link to comment Share on other sites More sharing options...
scott100 Posted January 25, 2006 Share Posted January 25, 2006 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 More sharing options...
ranjithch Posted January 30, 2006 Author Share Posted January 30, 2006 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><{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
aspnetguy Posted January 30, 2006 Share Posted January 30, 2006 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 More sharing options...
ranjithch Posted January 30, 2006 Author Share Posted January 30, 2006 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. <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
aspnetguy Posted January 30, 2006 Share Posted January 30, 2006 as said before just use <noscript>. That is the only way I know of. Link to comment Share on other sites More sharing options...
joecool2005 Posted January 30, 2006 Share Posted January 30, 2006 There is some code that Netscape don't understand like<a href=# ...><label>Also on explorer the alignments of textfield are much nicer than other browser.You have no choice to test all browser.Joe Link to comment Share on other sites More sharing options...
aspnetguy Posted January 30, 2006 Share Posted January 30, 2006 There is some code that Netscape don't understand like<a href=# ...><label>Also on explorer the alignments of textfield are much nicer than other browser.You have no choice to test all browser.Joe<{POST_SNAPBACK}> What does this have to do with whether JavaScript is turn on or off? Link to comment Share on other sites More sharing options...
joecool2005 Posted January 30, 2006 Share Posted January 30, 2006 Just to let you know that you can have surprise by using another browserJoe Link to comment Share on other sites More sharing options...
aspnetguy Posted January 30, 2006 Share Posted January 30, 2006 <noscript> is a standard supported by all modern browsers. There should be no surprise. Link to comment Share on other sites More sharing options...
scott100 Posted January 30, 2006 Share Posted January 30, 2006 Is there any way we can check the javascript enabling with navigator object or with some other object...<{POST_SNAPBACK}> 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 More sharing options...
ranjithch Posted January 31, 2006 Author Share Posted January 31, 2006 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 <{POST_SNAPBACK}> Thanks scott. It is of a nice help provided. I will use that. Link to comment Share on other sites More sharing options...
ranjithch Posted January 31, 2006 Author Share Posted January 31, 2006 Can anybody tell me how to turn off the Javascript functionality in the browser for instance IE?? This is needed for testing purpose. Thanks in advance... Link to comment Share on other sites More sharing options...
aspnetguy Posted January 31, 2006 Share Posted January 31, 2006 look herehttp://kb.iu.edu/data/ahqx.htmlmake Google your best friend Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now