Click to See Complete Forum and Search --> : Remote Window Closing


cdn415
02-28-2003, 05:19 PM
Ok. I share a website with my friend. I need a script to access one webserver(mine), and if my webserver is not running, it needs to switch to a second webserver(my friends). Is there a script that can do this or will someone do this for me?

AdamBrill
02-28-2003, 10:51 PM
That wouldn't be possible with javascript. I'm not sure if it could be done some other way or not. I think maybe you could set up your domain to link to your server as the primary and your friends as the secondary, but I'm not sure.

cdn415
03-01-2003, 11:00 AM
Well is there a way to close a remote window? Like right now the first page is set up to open my webserver and then after 10 seconds it opens my friends webserver. I used: <body onLoad="javascript:openwindow('http://169.254.....');"> then: <meta http-equiv="refresh" content="10; url=http://68.235....">
So if my webserver responds it will close the other window above^. Is it something like <body onLoad="javascript:closewindow('Window name or adress here');"> ????

AdamBrill
03-01-2003, 11:13 AM
There is, but it only works if you opened the window. The other problem with that is if your site isn't there, it won't open anyway. That's why I don't think it will work any other way. :) But, if you want to close a window, it is like this:

windowname.close();

Just in case you still want that for something. Another thing about that is you can only do it if it is on the same domain, so...