PDA

View Full Version : Javascript of BACK and OPEN



Haisook
09-28-2005, 05:04 PM
I need to know the javascript codes of these orders:

- Back to previous page "History"
- Open same page in a whole window (from a framed page)

Thanks

Twey
09-28-2005, 05:39 PM
- Back to previous page "History"
history.back() or history.go(-1)

- Open same page in a whole window (from a framed page)
This isn't Javascript. The link should look like this:
<a href="foo.htm" target="_top">bar</a>

Haisook
09-28-2005, 09:04 PM
This isn't Javascript. The link should look like this:
<a href="foo.htm" target="_top">bar</a>I need a single script to put it as a template for all links. I know the manual method.

Haisook
09-28-2005, 09:15 PM
history.back() or history.go(-1) What's the difference between each? The second one doesn't work if it's clicked from a previously maximized page from a frame. It goes back to the homepage of the frame, not the previous one.

Hope you understand this.. lol .. I know it's kinda confusing... :o

Twey
09-29-2005, 03:01 PM
There is no difference, I believe. However, if you're experiencing problems with one, obviously use the other.

I need a single script to put it as a template for all links.

<base target="_top">
in the head.