JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
changing the destination of the "Back" button? Posted by kvarnsten on 1 May 2004 at 11:35 AM
I am using a forwarding url for one of my websites, but have to have the browser's "Back" button reach the previous web page visited instead of the forwarding url that instantly again will forward to the current page.

Can this be done using java script?

many thanks,


Matt
Report
Re: changing the destination of the "Back" button? Posted by Weirdofreak on 2 May 2004 at 1:41 AM
Don't think so, unless you use an ActiveX plugin, which is incompatible with anything that isn't IE.

Some browsers will ignore forwarding pages for purposes of the back button, especially if you use the meta tag to do it, or you could make a back link, although I can't remember offhand what you need to do to go back two pages.
Report
Re: changing the destination of the "Back" button? Posted by zibadian on 2 May 2004 at 4:39 AM
: Don't think so, unless you use an ActiveX plugin, which is incompatible with anything that isn't IE.
:
: Some browsers will ignore forwarding pages for purposes of the back button, especially if you use the meta tag to do it, or you could make a back link, although I can't remember offhand what you need to do to go back two pages.
:
That code is if memory serves me well:
  history.back(2);

or you can use
  history.go(-2);

Report
Re: changing the destination of the "Back" button? Posted by kvarnsten on 2 May 2004 at 12:39 PM

: That code is if memory serves me well:
:
:   history.back(2);
: 

: or you can use
:
:   history.go(-2);
: 

:

But if I have to have the back button to work, shouldnt it be possible to have the webpage itself presented in some kind of java window, applet based or not. And if so the backbutton would work right? Cause anything loaded in an appplet window wouldnt be affected by the history order right?


Matt
Report
Re: changing the destination of the "Back" button? Posted by Weirdofreak on 3 May 2004 at 12:49 PM
I may not have my terminology right here, plus I'm not at all sure I understood you correctly, but I'll try:

A Java Applet, which would appear in the browser window, wouldn't be affected by the back/forward buttons, but the window itself would. So if you go to x.com, which has a Java applet, from y.com and go from there to z.com, neither of which do, you could press bak on z.com to go to x.com, and back on x.com to go to y.com, and vice-versa with the forward button. The actual content of the applet would be irrelevant, unless it did something to affect the back/forward buttons. I dunno if Java can or not.

A Java Script (not to be confused with a Javascript) doesn't even use a browser, so there'd be no back/forward buttons to be affected by.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.