javascript history.go command

javascript history.go command

Post by Ray » Fri, 10 Nov 2000 04:00:00



ie5, netscape 4, fp2000

My asp pages are all scripted in VBScript. But I'm using a handy little java
1-liner for some links. I know diddley about javascript.

This works fine in both IE and Netscape to get me back to the last page :

<a href="javascript:history.go(-1)">

However, the following link to go to a previously viewed page only works in
Netscape, IE doesn't respond at all.

<a href="javascript:history.go('gallery.asp')">

I don't particularly want the browser to have to reload that previous page
from the server - any ideas ?

Thanks
Ray

 
 
 

javascript history.go command

Post by Allan Webbe » Fri, 10 Nov 2000 04:00:00


<a href="javascript:history.go('gallery.asp')">

That's not a Javascript Command.  If gallery.asp is not in
the history list it won't work.  I'm not even sure it would
work if it was in the history.

Why not just make a link to gallery.asp ?

regards

Allan

--
================================
Newbee's FP2000 FAQ available at
http://newbee.hostroute.co.uk
================================


> ie5, netscape 4, fp2000

> My asp pages are all scripted in VBScript. But I'm using a handy little java
> 1-liner for some links. I know diddley about javascript.

> This works fine in both IE and Netscape to get me back to the last page :

> <a href="javascript:history.go(-1)">

> However, the following link to go to a previously viewed page only works in
> Netscape, IE doesn't respond at all.

> <a href="javascript:history.go('gallery.asp')">

> I don't particularly want the browser to have to reload that previous page
> from the server - any ideas ?

> Thanks
> Ray


 
 
 

1. Javascript 'history.go' command in IE

I posted this message some time ago without much joy, so here goes again . .
.

ie5, netscape 4, fp2000

I'm using the following code to substitute the 'back' button of the browser
and it works fine in both IE and in Netscape :

<a href="javascript:history.go(-1)">

However, the following link to go to a previously viewed page (in the
history) only works in
Netscape, IE doesn't respond at all.

<a href="javascript:history.go('gallery.asp')">

I don't particularly want the browser to have to reload that previous page
because it carries a host of parameters and would slow down the browsing
anyway.

Is the command not compatible with IE or perhaps there's a syntax error ? Is
there a substitute command that does the same thing?

Would really appreciate advice on getting around this one!

Thanks
Ray

2. IBM and Amdahl -- comp.parallel (20/28) FAQ

3. ERASING IE BACK HISTORY COMMAND??

4. Home Page

5. ** Browser HISTORY? Command **

6. How to supress unread marks adding e.g. new field in all documents of db?

7. is there something wrong with IE6 and history.go(-1) ??

8. Need Initialization String for Infotel Modem

9. onClick=history.go(-1) doesn't work in IE3.02?

10. Refresh Page using JavaScript 'history' feature?

11. Help with "javascript:history.back()"

12. Drop Down List Box with Go Command

13. My ID and PASSWORD don't go into POST command