Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Posted: 7/3/2003 8:47:03 AM EDT
Dunno if this is possible, but I'll ask anyway...

Suppose I have 2 web pages, and I have to scroll down in page 1 to get to the link to page 2.  Suppose page 2 has a "back" button to return to page 1 using a standard xxx construct.  This will always return to the top of page 1.  How do I return to the scrolled position on page 1?
Link Posted: 7/3/2003 9:05:43 AM EDT
[#1]
Use the "Back" button on your browser.

If you are writing this code, you could put a tag in the text and have the "Return to Page One" hyperlink return to that tagged position.

it would look like this:


And on page one, right above the code for the link to page 2, put
... to label that spot.

You could stack the label with your link, for example:
go to page 2

HTH
Scott
Link Posted: 7/3/2003 9:46:02 AM EDT
[#3]
You can access browser history through javascript by creating another button or hyperlink that has a history.back command.

< INPUT TYPE="button" value="Back" Name="Back" onClick="history.back()" >
< INPUT TYPE="button" value="Fwd" Name="Forward" onClick="history.forward()" >
Link Posted: 7/3/2003 10:07:46 AM EDT
[#4]
Link Posted: 7/3/2003 10:22:37 AM EDT
[#5]
It's a lifestyle. [;)]
Link Posted: 7/3/2003 10:30:48 AM EDT
[#6]
Thanks, gents.  onClick="history.back()" seems to have the desired behavior.  Now how do I get the friggin' mouse cursor to switch to the hand pointer?  I'm sure it's something like

onMouseOver="switch the damn cursor, will you?"

But I'll be damned if I can find it documented anywhere.

Thanks.
Link Posted: 7/3/2003 10:40:42 AM EDT
[#7]
Or for those who are greatly annoyed by the

Go Back

function, like me, cause most likely I came to your Page 2 via a search engine, just place an #anchor at the bottom of Page 1, and link to there:

Link Posted: 7/3/2003 11:27:11 AM EDT
[#8]
Quoted:
Thanks, gents.  onClick="history.back()" seems to have the desired behavior.  Now how do I get the friggin' mouse cursor to switch to the hand pointer?  I'm sure it's something like

onMouseOver="switch the damn cursor, will you?"

But I'll be damned if I can find it documented anywhere.

Thanks.
View Quote


put a

style='cursor:hand'

in your tag

Link Posted: 7/3/2003 12:17:25 PM EDT
[#9]
Thanks again, gents.

I gotta tell ya, web page coding reminds me of politics in the Balkans.  Here I am writing PHP to generate HTML that contains Javascript, CSS, and a dash of XHTML.  About half of HTML's features are deprecated or dropped in XHTML in favor of CSS, but what's a little deprecation among friends? [;D]

And I thought the K&R style wars were a big deal. [:D]
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top