Forum Moderators: open

Message Too Old, No Replies

Best way to use back button returning to long list?

         

cdgeorge

7:08 pm on Jan 28, 2005 (gmt 0)

10+ Year Member



When I present a long list of items to sell on a web page, and you have to scroll down to find an item you are interested in - you then click on it for 'more details' and a new page loads - how do you most efficiently code in a back button from that page to return to 'the same anchor point' in the list? Without relying on the browsers' back button?

I really want to avoid having to code an 'anchor' on every item on the list.

I also want to avoid using JavaScript to simulate the browser back button (I try to use server side scripting in case JavaScript is disabled on the customers' browser).

Perhaps I could use PHP to simulate the browser back button - but I don't know how.

lZakl

9:58 pm on Jan 28, 2005 (gmt 0)

10+ Year Member



How about opening each item in it's own pre-sized window without a tool bar ... And a button that says "Close window". That way, they get a new window for every item they click on, they can keep it open and minimized and keep shopping, AND they don't lose their place when they go 'back'. Just my 2¢ :0)

-- Zak

Sanenet

10:42 pm on Jan 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Opening the new window as you describe still requires some JS.

If your shopping list is dynamically generated, it's fairly simple to code the anchor, just call the anchor the product id (for example).

lZakl

1:15 am on Jan 29, 2005 (gmt 0)

10+ Year Member



Sorry! I skipped RIGHT PAST the "I don't want to use Javascript" part.. lol However Opening a new window will be supported in almost EVERY browser out there as it's one of the most common functions used.

Sanenet is also right though, using anchor wouldn't be that big of a deal either.

Although this works if Javascript is disabled... You just can't add the "close this window" button and whatnot..
<a href="yoursite.com" target="_blank")>link</a>

-- Zak