View Full Version : Scrollable content help needed

10-10-2008, 02:34 PM
1) Script Title: Scrollable content III

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/iframescroll.htm

3) Describe problem:
I am making a small website for a bag designer and using the scrollable content script for a photo-navigation.
But when you scroll down to one of the bags in the bottom, and click that to go to the page about that bag the scrollable navigation is of course back to the top.

That means that if you want to look at the next bag you have to scroll down again completely.
This will become very annoying once the list of bags becomes longer.

Is there someone who can help me with a method that will keep the navigation on the spot i last scrolled to?

I know about html and about css, but javascript i only know how to copy and paste so be gentle on me ;)

a test version of this site is here: http://www.omniafausta.com/barkinbag

thanks in advance!

10-11-2008, 02:23 AM
You can do that by using page anchor.

Add a name on your a element:

<a href="tas_v08_01.html" target="_parent" name="#knop01"><img src="images/knoppen/voorjaar08_01_knop.jpg" alt="" /></a>

...and an onclick event to instruct the current page to load on that specific anchor name:

<a href="tas_v08_01.html" target="_parent" name="knop01" onclick="this.href=location.href+this.name;"><img src="images/knoppen/voorjaar08_01_knop.jpg" alt="" /></a>

This should go all the way to all your links.

Hope that makes sense.

10-11-2008, 04:28 PM
thanks, was thinking about a solution like this, but didnt have a clue how to do it ...
will try it asap (is weekend now so probably somewhere next week...) and i will post if it works or not

10-13-2008, 02:35 PM
hmmm maybe i am doing something wrong, but it doesn't seem to work...
website is still here: http://www.omniafausta.com/barkinbag

I haven't done it on all links yet, but i copied the bottom link/image and tried it on there, but if i click that link i do not go to the right page, but i go to the page that is in the iFrame (tassennav.html), and on that page i do not got to the right anchor either...

hope someone will be able to help me again

10-14-2008, 12:04 AM
Make the following changes instead:


10-14-2008, 08:35 AM
thanks for your continued help

now it does go to the correct page again, but the effect is totally the same as without the onclick added... so it does not go to the correct button in the iFrame.

10-14-2008, 08:45 AM
I'm sorry, but I'm on my wits end. I realized, that the entire page is reloaded so, the script is neglected.

10-14-2008, 08:48 AM
ah ok, thanks for your input anyway

well back to the drawing board then i guess...
unless someone else has a brilliant idea?