...

View Full Version : Can a HTML/JS page sense if a browser won't work with it ??



chris
07-23-2002, 09:20 PM
Is there some standard method of checking with the brower for JS compatability ??

I have the following that won't work on IE 5.x in Windows 2000 Pro

"window.location='navpoint.php?user_id=1234&"

nothing happens at all, do I need the href in there ??

Confused

Chris

neil.c
07-23-2002, 09:27 PM
window.location sets the whole of the window's address bar. you usually have to put the whole url in there i.e.

window.location='http://sitename.tld/navpoint.php?user_id=1234&'

ok:thumbsup:?

chris
07-23-2002, 09:50 PM
thanks Neil !! seems reasonable.

thing is it's worked in alpha testing on 6 different browsers and configuratons.

dunno,
Chirs

ShriekForth
07-23-2002, 10:44 PM
If the user has turned off javascript it will not matter the format it is in. You could do this though



<noscript>
<meta http-equiv="REFRESH" content="0; url=navpoint.php?user_id=1234&">
</noscript>



You might want to check that trailing &... it seems that has caused be problems before, but I think that was in Netscape.

ShriekForth

chris
07-23-2002, 10:54 PM
ah ha!

i'll put that in everywhere. sanity check:

in IE. In InterNet Settings. under advanced : MicroSoft VM / JIT Compiler for virtual machines enabled
...this does not effect JScript -- right ??

Also, what aer the common settings for Java Script enabled on IE ??

What I know :
Have security set to medium or low for InterNet security setting.

... any other gotchas ??
Chris

ShriekForth
07-23-2002, 11:08 PM
Scripting --> Active Scripting is what will control the javascripts execution.

At a Medium setting or lower, javascript will be on. Medium is default for the "internet zone", I think... At High, scripting will be off, along with pretty much everything else. :) I found this out when my redirect for browsers not using cookies would not work. The client forgot to mention that he had disabled cookies by moving the slider to High, I assumed he just did it via the custom options.

ShriekForth

chris
07-23-2002, 11:12 PM
u are the man.

i believe this is my problem also.

Chris



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum