[Javascript] Browser-problem, again...
Terje Bremnes
terjeb at ii.uib.no
Fri Aug 17 01:30:13 CDT 2001
Hi,
I posted this some days ago but have yet to receive a reply from anyone.
As this is getting to be an annoying little problem now, I post it to
you guys again, hoping that someone will take the challenge of helping
me out!
Here´s the problem :
> I am writing a simple javascript for use on a web-page that will deny
> access to another page for everybody not connected to a specified network
> (specified by ip-adress prefix). The script works fine with Netscape, but
> not with the Internet Explorer. I guess there are different ways for the
> browsers to read and send information. Anyway, here is the script so far :
>
> <SCRIPT LANGUAGE="JavaScript">
> <!-- Begin
> ip = "" + java.net.InetAddress.getLocalHost().getHostName();
> if (ip.substring(0,10) != "xxx.xxx.xx")
> {
> alert("Access only if connected to LAN.");
> history.go(-1);
> }
> else window.location = "destination.html";
> // End -->
>
>
> (The IP-adress are replaced here for anynomous reasons, as is the
> name of the destination file.)
Hoping for help soon as I was hoping to have this worked out before going
to Greece on holiday tomorrow.
Cheers,
Terje B.
More information about the Javascript
mailing list