Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BACK PAGE LINK - WON'T GO BACK ON Netscape

Status
Not open for further replies.

Rocker

Programmer
Jul 11, 2000
13
AU
Hi,
you click a link on the page and it returns you to the last page you were on. Looks like this:

<form><A HREF=&quot;Javascript:history.go(-1);&quot;><STRONG>CLICK HERE</STRONG></A> to return to the form to add the information.</FONT></form>

I put this in the page and tested on IE 6 and NS 4.5 and it works every time, no problem.
Then I put the page on the web server ( via FTP) and it works fine in IE but not in Netsape. Refuses to go back or anywhere.
Can anyone help please?
rhg
 
I think the history.back() is more NS friendly You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
If you mean
<A HREF=&quot;Javascript:history.back(-1);&quot;>
i just tried it and NS doesn't like that either.
Rocker
 
actually that should be
<A HREF=&quot;Javascript:history.back(1);&quot;>
but like I said, I think it is.
You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 

<a href=&quot;javascript:history.go(-1);&quot;>back</a> works perfect in Netscape as well as in any other browser. Check out your syntax.

This:
<A HREF=&quot;Javascript:history.back(-1);&quot;>
is an error, because no parameter is allowed for back() or forward() functions. It should be just [tt]history.back()[/tt].

 
oddly enough I never knew this due to never using the back and forward but you will not recieve a error if you do enter a parameter like
<A HREF=&quot;Javascript:history.back(4);&quot;>
seems to just always go back one page.

Thanks for the correction starway
You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
These suggestions, including the one I used in the first place, work perfectly in my computer, but NS is no go as soon as I put the page on the web.

Lets get closer to this.
I have checked further. The page with the go back link is an error page which we end up on if a required field in a form is not filled in. The back button on the browser (NS ) works fine as does the link in question if I try to return to any &quot;normal&quot; page. I now find that the only time there is an error is when I go to the page with the &quot;go back&quot; button from the feedback form I am using and only when on the web. In this case the browser &quot;back&quot; button on NS does not work either!
So, fine on IE in all cases when on my computer, fine on IE on the web, fine on the web using NS when using other pages to precede the page with the go back link.
The form &quot;action&quot; goes to a php page and the method used to send the user on to the error page is
echo &quot;<META HTTP-EQUIV='refresh' CONTENT='0;URL=error.htm'>&quot;;
WORKS for IE anD NS but once on the error page (with the go back link) in NS she won't go nowhere.
Rocker
 
I now believe the problem is that NS does not like the bit of script in the .php page that sends user to error page. IE is forgiving but NS will not allow either the browser back button or the &quot;go back to last page&quot; javascript to work. Using history.go(-2) as a &quot;go back&quot; link works as it goes back to the php page then back one more to the form but then of course this messes IE up which doesn't count the php page and goes back another page again.
Anyway I don't want to have a page that renders the NS back button unworkable.
So now I need to go back to the drawing board with the php script. ( Grrr...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top