Javascript

Wednesday, February 26, 2003 by joetheblow | Discussion: WinCustomize Talk

How do you make a simple script that tells the browser to fo foward or backward?

Thanks
MikeB314
Reply #1 Wednesday, February 26, 2003 4:20 PM
Example link that goes back one page:

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

Example link that goes forward one page:

<a href="javascript:history.go(+1)">forward</a>

Powered by SkinBrowser!
Peff
Reply #2 Wednesday, February 26, 2003 4:23 PM
In IE, you use the window.history object (window can be ommited).

This object contains 3 methods:

back() - navigates back one page
forward() - navigates forward one page
go(int) - navigates relative to the current page (negative numbers go backwards, positive numbers go forwards)

Our shop deals with IE only environments, so I'm not sure if this object is supported by other browsers.

Hope this helps.



Powered by SkinBrowser!
Peff
Reply #3 Wednesday, February 26, 2003 4:23 PM
dang -- Mike was too quick!!

Powered by SkinBrowser!
MikeB314
Reply #4 Wednesday, February 26, 2003 4:25 PM
Hehe

If you want to make a page does that automatically, copy the bit inside the quotes and add it to your <body> inside the onload="" attribute. Such as:

<body onload="javascript:history.go(-1)">

That would be quite an annoying page to visit, however.

Powered by SkinBrowser!
joetheblow
Reply #5 Wednesday, February 26, 2003 4:41 PM
thanks guys
The DJ
Reply #6 Wednesday, February 26, 2003 4:47 PM
Hey if anybody knows this is from another forum in which this person needs help:


Norton 2003 Ad Blocker Java Script Screwed?


I've got Norton Internet Security/FireWall and Anti-Virus 2003 installed, with ad and pop-up blocker turned on. I can usually get to real pop-up pages (by real I mean ones I click through links, not ads) but for some reason a lot of sites wont open Javascripted pop up windows. I've turned off ad and pop-up blocking, I've disabled Norton and even completely uninstalled it once, but I still cant open a lot of JS pop-up links! My IE6 is set to allow Javascript, so I dont know what the problem is....

Anyone help?





He has bumped this thread alot of times with nobody helpin him so I thought maybe somebody here would know.
The DJ
Reply #7 Wednesday, February 26, 2003 6:38 PM
Oh well it was worth a try.
Peff
Reply #8 Wednesday, February 26, 2003 6:49 PM
I figured Mike would beat on this one too....

I'm not sure what the problem is. It sure sounds like something is still intercepting/overriding the browser window.open function to supress popups. It really depends on how the norton popup blocker works. Sorry I couldn't help

Powered by SkinBrowser!
Peff
Reply #9 Wednesday, February 26, 2003 6:50 PM
ooops----I figured Mike would beat me on this one too....

Powered by SkinBrowser!
The DJ
Reply #10 Wednesday, February 26, 2003 7:01 PM
Oh no don't worry about it. It was something I threw out there.

He's been bumpin the thread since yesterday so I thought I would try here.
sig101
Reply #11 Wednesday, February 26, 2003 7:11 PM
Wonder if he cleared the browser's cache/TIF after he disabled Norton's pop up blocker. (I know that's basic, but some people retain the cache/TIF and don't clear it.) Dunno if that's a factor with NIS, but I know with other pop up blockers, disabling the the blocker, clearing the cache. and just to be sure closing the browser before trying again, usually works if there is a previous restriction on legit pop up windows.
Peff
Reply #12 Wednesday, February 26, 2003 7:21 PM
Hey, good thought, Sig. I keep my settings on 'refresh page on every visit', so I rarely have to mess with the cache. Might be worth a try.

Powered by SkinBrowser!
The DJ
Reply #13 Wednesday, February 26, 2003 7:38 PM
I appreciate that sig and will post it in his thread. Thanks.
sig101
Reply #14 Wednesday, February 26, 2003 7:45 PM
Well, I know that with WebWasher and Proxomitron, after disabling them sometimes even refreshing the page alone won't work to clear the previous filtering. Hence my skill at on demand cache clearing and browser closing. Anyway, hope it helps although the poor fellow already went through uninstalling and reinstalling a Norton product.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01