Click to See Complete Forum and Search --> : javascript server query
dupls
07-31-2003, 03:59 PM
I have the same javascript on 2 different servers. It works on one but not the other. Can someone tell me what I can do on the server side to change this.
The script is very simple. Direct Netscape version 4.8 or lower to another file.
function browserRedirect() {
if(navigator.appName=="Netscape" && parseFloat(navigator.appVerion <= 4.8)
window.location.replace("defaultNN.htm")
else
window.location.replace("default.htm")
}
First of all, javascript does not run on the server, so it makes no difference what server it is on. The only thing that matters is the browser -- which can be set to ignore javascript.
Second, what you posted below won't work in any browser. You have quite a few syntactical errors. Try this one:
function browserRedirect() {
if(navigator.appName=="Netscape" && parseFloat(navigator.appVersion) <= 4.8) {
window.location.replace("defaultNN.htm");
}
else {
window.location.replace("default.htm");
}
}
dupls
07-31-2003, 04:17 PM
I had it corrrect on my htm file just typed incorrect in this block instead of copy and paste, sorry.
Still doesn't work on the one server. That's why I thought it's a server problem as the same thing works on the other server.
original -
function browserRedirect() {
if(navigator.appName=="Netscape" && parseFloat(navigator.appVersion) <= 4.8) {
window.location.replace("defaultNN.html");
}
else {
window.location.replace("default.htm");
}
}
slight name change to .html when I don't use a regular file.
Anymore useful comments?
Post a link to both pages. The one that is working, and the one that is not, please.
dupls
07-31-2003, 04:22 PM
www.xmarksystems.com - working
www.instantel.com - not
much appreciated
Try removing this function (from the script and the body onload) to see if it is interfering with the script. MM_preloadImages
dupls
07-31-2003, 04:31 PM
Tried internally.
No joy.
Can't think of anything else. that's why I tried this forum. Some real fundies like yourself.
Thanks,