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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Next and Previous by your self doesn't work?? 2

Status
Not open for further replies.

Qwark

Programmer
Sep 26, 2000
59
NL
Hello,

I have made a page with 2 frames. in frame 0 (header.htm) i have made a navigationbar, with the buttons next and previous. I doesn't work correctly with the next code in de header.htm:

<A href=&quot;javascript:parent.frames[1].history.go(-1)&quot; onMouseOver=&quot;aPrevious()&quot; onMouseOut=&quot;pPrevious()&quot;><IMG src=&quot;images/menu1/menulinks_ex.gif&quot; name=&quot;Previous&quot; alt=&quot;Previous&quot; align=right border=0></A>

Only frames[1] must be refresh.

Maybe it works better with some other code. Or i do something wrong. Can you help me?

Qwark.
 
what are aPrevious and pPrevious functions ? what is not working ? what happens ?
 
I'm not sure what the problem is. Try posting more of the code, or a link to the page containing the error. jared@aauser.com
 
Oke sorry, but that functions iza are for the images mouseover. That's working very good. That is not the problem. Maybe the next code is better to understand.
But it does the same without the nice looking images and mouseover events.
Sorry jaredn I have not more code who is handeling my problem, maybe that's the problem:

<A href=&quot;javascript:parent.frames[1].history.go(-1)&quot;>Previous</A>

Can anybody help me??

Thanks,

Qwark

 
Are you trying to access the first frame in the frameset? If so, remember array indexes start at 0. So your first frame is:

parent.frames[0]

you can also try:

parent.framename.history.back() jared@aauser.com
 
Tnx Jaredn,
I know the first frame is 0. But i must change the second frame or in javascript (frames[1]). I going to try .back can i use .forward instead of .history.go(+1). Does it also works in NS4+.

Qwark
 
Microsoft says:

This method performs the same action as a user clicking the Back button in the browser. The back method works the same as history.go(-1).

Netscape says:

This method performs the same action as a user choosing the Back button in the browser. The back method is the same as history.go(-1).

Jeez, almost sounds like copyright infringment on one of their parts. Anyway, they both seem to agree that history.back() and history.forward() should work just fine. They also say that history.go(-1) should work just fine.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Qwark,

Try this, i use this in a menu frame ( one or the 3 frameset) i work ok in IE 5+ NS 4.6-7
like a broswer back button.

<a href=&quot;javascript:history.back()&quot;>BACK</a>

PS : in NS target properties required.

Cheers.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top