PDA

View Full Version : Javascript error


Tidane
8-7-03, 10:49 AM
Another weird problem...on my 404 error page, i have the javascript code <A HREF="javascript:back()">here</A>

http://www.thefinalhaven.com
http://www.thefinalhaven.com/errors/404.php

I don't think this is right, but when I click it in Netscape it goes back. When I click it in Intenet Explorer, I get an undefined error. Does Netscape automatically understand that command, and I need to add something for IE, or is it just messed up? If I need to add something, what do I need to add?


Should I use <A HREF="#" onClick="history.go(-1)">here</A>?

Builder
8-7-03, 11:13 AM
I use <a href="javascript:history.back()">here</a> on a number of pages with no problems in Netscape or IE.

Good luck,
Kevin

stevel
8-7-03, 11:25 AM
Well, that's not what you have on your page right now. Be sure there's no space in "javascript".

Tidane
8-7-03, 11:42 AM
I know, that was a mistake.

I changed it to the second one, and it works now.