View Full Version : Redirection Problem
Graphik
11-05-2002, 03:56 PM
Hello,
Working with a redirection script that uses a delay and redirect to a URL. Well I would like that URL to be a local file on the network. This, as usual works with IE but NS4.x has issues when linking to a "file:///C|/" this is an example.
<!-- Begin
redirTime = "1000";
redirURL = "file:///G:/Blah/Blah.doc";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
// End -->
My question or rather request for help is how do I get around this NS problem. I also have problems with my menus. I always get an "Undefined URL file".
beetle
11-05-2002, 04:07 PM
Open the local file manually in NS4 and examine how it treats the URL.
Graphik
11-05-2002, 07:00 PM
I am not entirely sure what you mean. I can throw up an "alert" when it executes but, I believe there should be some statement that gets around this problem.
beetle
11-05-2002, 07:17 PM
What I'm saying is, does NS4 use "file:///G:/Blah/Blah.doc" for it's file-url syntax? Or is it different from that? Manually open the file in NS and see how it looks...
Graphik
11-05-2002, 07:24 PM
Yes NS uses the exact file location if I pull it up manually. Again there is no problem if I use the <href> tag. But for some reason NS cannot open the file if it is embedded in script. Same issue for menus that use scripts for the configuration. Someone should know what I'm experiencing, and I am hoping there is some bit of syntax that will get me around this. Thanks
beetle
11-05-2002, 07:27 PM
Dunno, I know nothing about making NS4.x tick. Sorry.
Roy Sinclair
11-05-2002, 08:42 PM
When using the script does the URL show up properly in the address bar? If not, try escaping the character(s) that shows up wrong.
Graphik
11-05-2002, 08:51 PM
Hello Roy,
No it just hangs with the error;
"JavaScript Error:
http://Servername/DIR/redirect3.htm, line 10:
illegal URL method 'file:'. "
Of course when I look at line 10 it is referencing,
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
redirTime = "1000";
line9. redirURL = "file:///C:/Tournament";
line10. function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
// End -->
</script>
beetle
11-05-2002, 08:59 PM
Maybe NS4 doesn't let you redirect to a local file. Can you successfully redirect to an HTTP url? like http://www.google.com ?
Roy Sinclair
11-05-2002, 09:03 PM
It's pretty obvious that NS is rejecting file URLs. There may be a way to short-circuit that check though. Try taking any link on the page and altering it's URL to the file: url and then invoking it's click method.
Graphik
11-05-2002, 09:04 PM
Beetle,
Absolutely, I think I have fixed it by setting a
<META HTTP-EQUIV="refresh" CONTENT="5; URL=file:///C:/Tournament.doc">
in the head, but there is still a problem that I need to fix.
Thanks,
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.