By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,965 Members | 1,739 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,965 IT Pros & Developers. It's quick & easy.

the "history.back" function

P: n/a
Hi...

I use a function something like this,

<a href="javascript:history.back();">Return to original page</a>

to give people a "back" option sometimes on pages.

Is there any way of directing them back to a particular named anchor on the
last page?
thanks for any advice...

GB
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Food Groupy wrote:
Hi...

I use a function something like this,

<a href="javascript:history.back();">Return to original page</a>
http://www.jibbering.com/faq/#FAQ4_24
to give people a "back" option sometimes on pages.
They already have one, conveniently built into the browser, and it
doesn't suffer from the problem you are asking about next.
Is there any way of directing them back to a particular named anchor on the
last page?


How are you even sure that anchor exists in the last page? And, if I
bookmark the page, reboot, reopen the page with the bookmark, how does
the .back() work? It doesn't......

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2

P: n/a
to give people a "back" option sometimes on pages.
They already have one, conveniently built into the browser, and it
doesn't suffer from the problem you are asking about next.


I understand this about the "back" function being built into the browser.
My particular example is for a customer who has completed a long form as
part of a registration process, presses "submit", goes to a payment options
page where his chosen registration option is displayed. If he discovers he
has chosen the wrong option, I wanted a "customized" BACK script that would
take him directly to the specified <SELECT> option, instead of having them
laboriously scrolling around to find it.

It was for the customer's convenience.
My, how we jump to conclusions.
My, how we love to preach.

Is there any way of directing them back to a particular named anchor on the last page?


How are you even sure that anchor exists in the last page? And, if I
bookmark the page, reboot, reopen the page with the bookmark, how does
the .back() work? It doesn't......


I think my above detail explains that "yes", there is an anchor on the page.
I suppose I could devise some kind of cookie script that would do the trick.

Jul 23 '05 #3

P: n/a
Food Groupy wrote:
to give people a "back" option sometimes on pages.
They already have one, conveniently built into the browser, and it
doesn't suffer from the problem you are asking about next.

I understand this about the "back" function being built into the browser.
My particular example is for a customer who has completed a long form as
part of a registration process, presses "submit", goes to a payment options
page where his chosen registration option is displayed. If he discovers he
has chosen the wrong option, I wanted a "customized" BACK script that would
take him directly to the specified <SELECT> option, instead of having them
laboriously scrolling around to find it.


Page1 checks for the cookie, if its there, it sets focus on the select
and then it removes it.
Page2 sets the cookie, and then does the .back()

A better solution would be to have the payment method on the second page
though.
It was for the customer's convenience.
My, how we jump to conclusions.
You should read the FAQ, with regards to basic assumptions in this group.
My, how we love to preach.

My, how we love to leave out details that make a difference in the
possible answer you might recieve.
Is there any way of directing them back to a particular named anchor on
the
last page?
How are you even sure that anchor exists in the last page? And, if I
bookmark the page, reboot, reopen the page with the bookmark, how does
the .back() work? It doesn't......

I think my above detail explains that "yes", there is an anchor on the page.


A <SELECT> isn't an anchor. They are two different things.
I suppose I could devise some kind of cookie script that would do the trick.


See above, and kill the sarcasm, it can go on for weeks and serves no
purpose.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #4

P: n/a
Randy, an honorable 'thank you' for your assistance...

(my how we love to jump to conclusions about other people jumping to
conclusions....)
"Randy Webb" <hi************@aol.com> wrote in message
news:lN********************@comcast.com...
Food Groupy wrote:
to give people a "back" option sometimes on pages.

They already have one, conveniently built into the browser, and it
doesn't suffer from the problem you are asking about next.

I understand this about the "back" function being built into the browser. My particular example is for a customer who has completed a long form as
part of a registration process, presses "submit", goes to a payment options page where his chosen registration option is displayed. If he discovers he has chosen the wrong option, I wanted a "customized" BACK script that would take him directly to the specified <SELECT> option, instead of having them laboriously scrolling around to find it.


Page1 checks for the cookie, if its there, it sets focus on the select
and then it removes it.
Page2 sets the cookie, and then does the .back()

A better solution would be to have the payment method on the second page
though.
It was for the customer's convenience.
My, how we jump to conclusions.


You should read the FAQ, with regards to basic assumptions in this group.
My, how we love to preach.


My, how we love to leave out details that make a difference in the
possible answer you might recieve.
Is there any way of directing them back to a particular named anchor on


the
last page?

How are you even sure that anchor exists in the last page? And, if I
bookmark the page, reboot, reopen the page with the bookmark, how does
the .back() work? It doesn't......

I think my above detail explains that "yes", there is an anchor on the

page.
A <SELECT> isn't an anchor. They are two different things.
I suppose I could devise some kind of cookie script that would do the
trick.
See above, and kill the sarcasm, it can go on for weeks and serves no
purpose.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.