Does anyone know if it is possible to "look before you link" to another
page?
Can I use JavaScript to test for the existence of a web document somehow
using
window.location.href?
Thanks.
Eric
gel...@govst.edu
If you can, you should better use a cgi script, giving a HEAD request to
the http server, then either send a location: line, either display an
error page..
--
Henri Torgemane http://www.undergrad.math.uwaterloo.ca/~htorgema/
Never let your sense of morals prevent you from doing what is right.
-- Salvor Hardin, "Foundation"
> If you can, you should better use a cgi script, giving a HEAD request to
> the http server, then either send a location: line, either display an
> error page..
couldn't you attempt to load the page in a new window and check for an
error condition? if no error, close the current window so the new window
replaces it. It seems this would work.
It would probably be better to use a very small ( hidden ) frame to do this.
The only problem would be to know when a loaded page is an error message
from the server or the regular page...
If you have access to the source of the page, you can simply set a javascript
property in the document.. If not, I don't really know how to do this reliably..