Click to See Complete Forum and Search --> : jscript doesn't recognise true value of my variable


therealphil
11-05-2003, 06:39 AM
See this (http://www.vector-networks.com/test/eval_basics/step1.htm) page.

The first alert tells you whether you are using IE or not (It either says "MSIE" or "not IE").

When you click on one of the radio buttons it will tell you if you are using IE or not again. However, I have tested this script many many times after many many changes in Mozilla Firebird yet, it still tells me I am using IE!!

Does anybody know why??

You will have to look at the Javascript to figure it out.

Ignore the validate() function. The function that runs when a radio button is selected is called enterpriseCheck(). The name of the browser is a global variable at the top of the code called browser.

Thanks.

Apan
11-05-2003, 06:46 AM
Well Im not sure but I think in Opera u can choose if it should be identified as IE or Netscape Nav. and some other.
Maybe it could be something similar to that?

therealphil
11-05-2003, 06:51 AM
No, it definately isn't that.

I have run the script with alerts that tell me what the value of the browser variable is and in Mozilla Firebird, it returns "Netscape", but then the rest of the script thinks its running in IE. :confused:

Fang
11-05-2003, 07:09 AM
line 156: if (browser = "MSIE"){
compare ==

therealphil
11-05-2003, 07:12 AM
Darn it! I keep doin that!!

Thank you!!!! :D