ush
04-04-2003, 09:00 AM
Hello!
I have a custom 404 error page which handles errors from a number of web servers...
The main server is www.thegrid.org.uk.
The others are www.[schoolname].herts.sch.uk where [schoolname] is any one of 560+ schools hosted on our server.
What I'd like to do is analyse the current URL (using javascript with RegExp?) and use document.write on the 404 page to indicate to the user whether they have come from the main site or a school's site (since, frankly, most of them don't realise where they've come from) and give them different instructions on how to report the missing page
I have no server-side scripting with which to accomplish this, hence I'm resorting to javascript.
I've been supplied the attached .js file but it doesn't work - as a js novice I'm in need of some specialist help, hence I'm here. Is the attached file workable or is there a more elegant solution?
Anything you can help me with is greatly appreciated!
Cheers
ian.
I have a custom 404 error page which handles errors from a number of web servers...
The main server is www.thegrid.org.uk.
The others are www.[schoolname].herts.sch.uk where [schoolname] is any one of 560+ schools hosted on our server.
What I'd like to do is analyse the current URL (using javascript with RegExp?) and use document.write on the 404 page to indicate to the user whether they have come from the main site or a school's site (since, frankly, most of them don't realise where they've come from) and give them different instructions on how to report the missing page
I have no server-side scripting with which to accomplish this, hence I'm resorting to javascript.
I've been supplied the attached .js file but it doesn't work - as a js novice I'm in need of some specialist help, hence I'm here. Is the attached file workable or is there a more elegant solution?
Anything you can help me with is greatly appreciated!
Cheers
ian.