Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: I need help with my Anchors

  1. #1
    Join Date
    Nov 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question I need help with my Anchors

    Hi,

    My client wanted me to set up a web site with scrollable content. Once the site was finish the client decided to add anchors within the ilayer that takes a user to content further down within that ilayer. The script I used for the site is:

    Scrollable content script II

    It's a great script.

    My problem is that anchors will not work within the ilayer, when clicked they go nowhere.

    Does anyone have a solution for this?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Hm? I've scanned quickly through the script, and they ought to work fine; the script doesn't touch the content of the div/layer, just its position.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Nov 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks for looking

    I have very little scripting knowledge, I am a designer, all I know is when I place an anchor in the ilayer and you click on it nothing happens, the user is not sent to the anchor. I have tried the same thing in and iFrame and it works just fine.

    ????????? . . .

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    PLEASE: Include the URL to your problematic webpage that you want help with. or paste your code here inside [code] tags.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Nov 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Posted link to test

    Hi Twey

    This is the link to the Anchor Test as you will see clicking on the link does not take you to the anchor.


    Thanks

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Works fine here.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Here too. What browser/OS are you using?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Nov 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow, you guys are right. Such a fundamental thing I didn't check it out in other browsers.

    I work on a Macintosh OS 10.3.9 using Safari. After reading your comments I tried it on a PC using Internet Explorer. Bingo it works. Although the bottom link stops working when you scroll right to the bottom and back up to that link.

    Now I have tried the anchors on following Mac browsers and got these results.

    Camino – Works Best

    Firefox – Works the same as PC Internet Explorer
    Netscape

    OmniWeb – Does not work
    Opera – Does not work

    So now I know this is not a universal problem. But it's a big one for me. My clients all use Macs.

    Thanks

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The script itself already has an alternative method built in. Try these instead of your anchor links (adapted from the moveup() and movedown() functions):

    Code:
    <a href="#" onclick="crossobj.style.top=(contentheight*(-1)+100)+'px';return false;">bottom</a>
    and:

    Code:
    <a href="#" onclick="crossobj.style.top=0;return false;">top</a>
    Using the two above links as templates (assuming they work in your browsers), you should be able to devise a way to scroll to just about anywhere you need to within the scrollable content area.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Surely that's not very reliable though? The anchors won't always be at the same pixel positions throughout different browsers and resolutions.
    P.S. it works in Galeon.
    Last edited by Twey; 12-18-2005 at 04:47 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •