Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 9th, 2006, 08:31 PM
Rsulliv1 Rsulliv1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 Rsulliv1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 20 sec
Reputation Power: 0
Returning to the same section of a page via 'back' button

Hey all, I'm trying to figure out how I can allow a user to link out of my site, but return to the same section if needed.

I know about named links, but I don't think that's the best solution.. or even possible for this. But I've been wrong before.

I'd want to let a user click back to the same view of my site when they hit their browser's back button. Is there anything specific code related to this?

If you need more info, please ask!

Thanks for any leads,
ryan.

Reply With Quote
  #2  
Old May 9th, 2006, 11:08 PM
Kravvitz Kravvitz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: USA
Posts: 134 Kravvitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 38 m 30 sec
Reputation Power: 4
I thought browsers remembered the scroll position automatically? IE/Win, Firefox, and Opera seem to.

It might be possible to do this in some browsers by storing the scrollTop and scrollLeft values in a cookie via onbeforeunload and then retrieving them from the cookie and setting them again via window.onload.

Reply With Quote
  #3  
Old May 10th, 2006, 09:11 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
It sounds like you're referring to two things... pressing the "back" button, and linking to your page (for future viewing).

Kravvitz is correct; positioning the page while pressing back is a browser issue... most browsers know how to do it automatically, it's out of the hands of the web developer.

Offering the ability to link to content (or bookmark content) half-way down a page is only possible using anchored links...

An alternative altogether would be to separate your content onto multiple pages... perhaps by section or chapter or some type of logical division.
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #4  
Old May 10th, 2006, 04:04 PM
Rsulliv1 Rsulliv1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 Rsulliv1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 20 sec
Reputation Power: 0
Quote:
Originally Posted by MadCowDzz
It sounds like you're referring to two things... pressing the "back" button, and linking to your page (for future viewing).


Cool. Thanks for the info. I'm only worried about when the user links out of my site, then uses the browser's "back" button. For the case in question, the user would only be one page ahead (i.e. one click of the "back" button for the return).

Could there be an issue if there are frames involved? The site has a header frame, content frame, and footer frame. For description's sake, the content frame is scrollable list of links which, when clicked, will update the content frame with details on that link. When the user hits the back button, the content frame returns to the list of links.. but always at the top of that list, instead of the last viewed location.

Anchored links would work, but doesn't the user have to use the supplied <a href="previouspage.html#linkxx">Better use this back button!</a> link instead of the browser's back button? or would the anchored link affect the browser's back ability too?

I think that the cookie settings is overkill, but clever. I'll give that a shot if I can't find out what's preventing the ootb browser functionality.

This is a question for the current site that's being run by this gallery.. it's a all static html site, so adding all the anchors would be tedious for them.. I'm almost done coding a php/mysql site that will take care of all this for them, so this isn't a production sensitive issue and will be moot in a few months. But they asked and I'm not a HTML master.. i'm actually a content management (documentum) developer, so I like jsp and databases!

Much thanks for the info,
-ryan.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > Returning to the same section of a page via 'back' button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway