Results 1 to 7 of 7

Thread: scrollbar not resetting to top of page with iframe links

  1. #1
    Join Date
    Mar 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy scrollbar not resetting to top of page with iframe links

    1) Script Title: Ajax Tabs Content Script (v 2.1)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/index.htm

    3) Describe problem:

    I am using google coop search results (an iframe search) in the default tab that has the content inside the container div

    When i click on additional search results, (i.e. 1 2 3 4 Next) at the bottom of the google search results, it doesn't bring the user back to the top of the page even though the links are targeting the whole page and not the iframe.

    I've boiled the problem specifically to if the links that target the whole page is the exact same URL as the page except for one piece (i.e. #456) which is at the end of google coop search results then the page will not refresh to the top.

    see below:

    ----------
    http://site.com/results.php?cx=01671...sa=Search#1451
    http://site.com/results.php?cx=01671...sa=Search#5675
    ------------

    This problem only appeared when I use the AJAX tab content script.

    Please help.
    Thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm the two urls you posted above are broken.

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    tankman (04-03-2008)

  4. #3
    Join Date
    Mar 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    they are sample domains - not intended to work. I'm pm you my site.

    thanks for the quick response.

  5. #4
    Join Date
    Mar 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I've posted this question in google coop forums as well and haven't received any advice.

  6. #5
    Join Date
    Mar 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I just thought of an idea, would a .htaccess rewrite work?

    if having only a "#333" as the difference from one page to the next, perhaps having a rewrite that forces a refresh by inserting something additional in the url

    ie.

    http://site.com/results.php?cx=01671...sa=Search#1451

    can be rewrite to be:

    http://site.com/results.php?blah=bla...sa=Search#1451

    I guess I could try it to see if it would work, however I'm a newbie and not a programmer...

    thanks

  7. #6
    Join Date
    Mar 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    update:

    when I move the following code
    --------------------

    <script type="text/javascript">

    var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()

    </script>

    ...above the countrydivcontainer div tags the problem is fixed... unfortunately the tabs stop working properly. Is there a work around?

    thanks.

  8. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please pm me a link to the problem page.

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
  •