Connecting Tech Pros Worldwide Help | Site Map

the "history.back" function

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 11:24 AM
Food Groupy
Guest
 
Posts: n/a
Default the "history.back" function

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



  #2  
Old July 23rd, 2005, 11:25 AM
Randy Webb
Guest
 
Posts: n/a
Default Re: the "history.back" function

Food Groupy wrote:
[color=blue]
> Hi...
>
> I use a function something like this,
>
> <a href="javascript:history.back();">Return to original page</a>[/color]

http://www.jibbering.com/faq/#FAQ4_24
[color=blue]
> to give people a "back" option sometimes on pages.[/color]

They already have one, conveniently built into the browser, and it
doesn't suffer from the problem you are asking about next.
[color=blue]
> Is there any way of directing them back to a particular named anchor on the
> last page?[/color]

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/
  #3  
Old July 23rd, 2005, 11:25 AM
Food Groupy
Guest
 
Posts: n/a
Default Re: the "history.back" function

[color=blue][color=green]
> > to give people a "back" option sometimes on pages.[/color]
>
> They already have one, conveniently built into the browser, and it
> doesn't suffer from the problem you are asking about next.[/color]

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.

[color=blue]
>[color=green]
> > Is there any way of directing them back to a particular named anchor on[/color][/color]
the[color=blue][color=green]
> > last page?[/color]
>
> 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......[/color]

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.



  #4  
Old July 23rd, 2005, 11:25 AM
Randy Webb
Guest
 
Posts: n/a
Default Re: the "history.back" function

Food Groupy wrote:[color=blue][color=green][color=darkred]
>>>to give people a "back" option sometimes on pages.[/color]
>>
>>They already have one, conveniently built into the browser, and it
>>doesn't suffer from the problem you are asking about next.[/color]
>
>
> 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.[/color]

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.
[color=blue]
> It was for the customer's convenience.
> My, how we jump to conclusions.[/color]

You should read the FAQ, with regards to basic assumptions in this group.
[color=blue]
> My, how we love to preach.
>[/color]

My, how we love to leave out details that make a difference in the
possible answer you might recieve.
[color=blue]
>[color=green][color=darkred]
>>>Is there any way of directing them back to a particular named anchor on[/color][/color]
>
> the
>[color=green][color=darkred]
>>>last page?[/color]
>>
>>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......[/color]
>
>
> I think my above detail explains that "yes", there is an anchor on the page.[/color]

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

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/
  #5  
Old July 23rd, 2005, 11:25 AM
Food Groupy
Guest
 
Posts: n/a
Default Re: the "history.back" function

Randy, an honorable 'thank you' for your assistance...

(my how we love to jump to conclusions about other people jumping to
conclusions....)


"Randy Webb" <hikksnotathome@aol.com> wrote in message
news:lNSdnXizF4Mos17d4p2dnA@comcast.com...[color=blue]
> Food Groupy wrote:[color=green][color=darkred]
> >>>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.[/color]
> >
> >
> > I understand this about the "back" function being built into the[/color][/color]
browser.[color=blue][color=green]
> > 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[/color][/color]
options[color=blue][color=green]
> > page where his chosen registration option is displayed. If he discovers[/color][/color]
he[color=blue][color=green]
> > has chosen the wrong option, I wanted a "customized" BACK script that[/color][/color]
would[color=blue][color=green]
> > take him directly to the specified <SELECT> option, instead of having[/color][/color]
them[color=blue][color=green]
> > laboriously scrolling around to find it.[/color]
>
> 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.
>[color=green]
> > It was for the customer's convenience.
> > My, how we jump to conclusions.[/color]
>
> You should read the FAQ, with regards to basic assumptions in this group.
>[color=green]
> > My, how we love to preach.
> >[/color]
>
> My, how we love to leave out details that make a difference in the
> possible answer you might recieve.
>[color=green]
> >[color=darkred]
> >>>Is there any way of directing them back to a particular named anchor on[/color]
> >
> > the
> >[color=darkred]
> >>>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......[/color]
> >
> >
> > I think my above detail explains that "yes", there is an anchor on the[/color][/color]
page.[color=blue]
>
> A <SELECT> isn't an anchor. They are two different things.
>[color=green]
> > I suppose I could devise some kind of cookie script that would do the[/color][/color]
trick.[color=blue]
>
> 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/[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.