Javascript detection
-
My Asp.net 2.0 pages need the client browser to have JavaScript enabled, and this must be detected immediately after the Page load so if the browser does not support the javascript I will redirect the user to some other page, but I don't know how to do that. In addition, the
Request.Browser.JavaScript
andRequest.Browser.JScript
do not work when the browser supports the JavaScript but the user has disabled it! Please help me detect if the user's browser is JavaScript enabled or not.Sojaner!
-
My Asp.net 2.0 pages need the client browser to have JavaScript enabled, and this must be detected immediately after the Page load so if the browser does not support the javascript I will redirect the user to some other page, but I don't know how to do that. In addition, the
Request.Browser.JavaScript
andRequest.Browser.JScript
do not work when the browser supports the JavaScript but the user has disabled it! Please help me detect if the user's browser is JavaScript enabled or not.Sojaner!
-
Use Javascript in the onload event of the page to redirect to one page, and a meta tag to redirect to another page.
--- Year happy = new Year(2007);
-
What kind of meta tag? And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
Sojaner!
Sojaner wrote:
What kind of meta tag?
http-equiv="refresh"
Sojaner wrote:
And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
It might be possible, but there is no obvious way to do it. The problem with that is that it's impossible to detect if Javascript is disabled, you can only detect if it's enabled. If it's disabled, there is nothing that you can use to do the detecting. -- modified at 2:52 Friday 19th January, 2007
--- Year happy = new Year(2007);
-
Sojaner wrote:
What kind of meta tag?
http-equiv="refresh"
Sojaner wrote:
And also I want the user to stay at the current page if his browser is javascript enabled and redirect him if his browser is javascript disabled.
It might be possible, but there is no obvious way to do it. The problem with that is that it's impossible to detect if Javascript is disabled, you can only detect if it's enabled. If it's disabled, there is nothing that you can use to do the detecting. -- modified at 2:52 Friday 19th January, 2007
--- Year happy = new Year(2007);
But I know a website that is written in CGI and immediately after you enter the main page, it detects that you javascript is disabled and redirects you to some html page that tells you to enabled the javascript! I don't care about the difference between detecting that the javascript is disabled or it is enabled! I just want to make the user, enable the javascript, when he enters my page! For example, I use Firefox 2.0, and I have installed an add-on name "No Script" that blocks the javascript scripts until you allow them to run, but when I'm debugging my code, using Firefox, my code could not detect that the javascript scripts are blocked! Although the
tags work correctly when this add-on block the scripts, but the Request.Browser.Javascript is true!
Sojaner!