Results 1 to 6 of 6

Thread: Page scroll to top when I click on any tab

  1. #1
    Join Date
    Feb 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Page scroll to top when I click on any tab

    1) Script Title: Ajax Tabs Content script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/

    3) Describe problem:
    For some reason, when i incorporate the code into my webpage, the screen scrolls to the bottom if i position the tab menu up on the top of the screen. But it is not the case if i position the tab menu down near the bottom of the screen, the page doesnt move and behave exactly as in the demo.

    The scrolling when the menu tab is on the top of the screen seems to try to position the tab menu in the middle of the screen. Is this expected behaviour or bug?

    Thank you.

  2. #2
    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

    Neither, I would expect. Does this happen on the demo page here at DD? Is there anything in your loaded content that might be causing this? How about a link to your problem page?
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sample problem in a website

    http://www.sugiato.com/ajaxtab/problem.htm

    So to replicate the problem, you need to let the tab menu closer to the top of your browser. When you click on the tab, it will reposition the page (as if the page refresh) so that the tab is somewhat lower in the screen.

    Thanks for looking into this, John.

  4. #4
    Join Date
    Feb 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Additional info

    One more thing that i notice.. if you dont maximize your browser screen, the problem is gone. This happens in my browser (IE 6 and Firefox) when the browser is set to maximize.

  5. #5
    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

    I think that if you assigned a fixed height to the content area, that effect could be avoided. Also, if the content area did not span the entire width of the page, that might be all that would be required to stop the effect. It really isn't so much that the page is scrolling as it is that the page's height is changing.
    - John
    ________________________

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

  6. #6
    Join Date
    Feb 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default That explains it...

    Thanks John! You're a genius!

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
  •