Results 1 to 8 of 8

Thread: Scrollable content help needed

  1. #1
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Scrollable content help needed

    1) Script Title: Scrollable content III

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ramescroll.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!

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    You can do that by using page anchor.

    Add a name on your a element:
    Code:
    <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:
    Code:
    <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.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  4. #4
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  5. #5
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Make the following changes instead:
    Code:
    onclick="parent.location.href=parent.location.href+this.name;
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  6. #6
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  7. #7
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    I'm sorry, but I'm on my wits end. I realized, that the entire page is reloaded so, the script is neglected.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  8. #8
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ah ok, thanks for your input anyway

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •