PDA

View Full Version : scrollbar not resetting to top of page with iframe links



tankman
03-30-2008, 09:35 PM
1) Script Title: Ajax Tabs Content Script (v 2.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/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=01671jujxu&cof=FORID%3A11&q=keywords&sa=Search#1451
http://site.com/results.php?cx=01671jujxu&cof=FORID%3A11&q=keywords&sa=Search#5675
------------

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

Please help.
Thanks

ddadmin
03-30-2008, 09:54 PM
Hmm the two urls you posted above are broken.

tankman
03-31-2008, 04:02 AM
they are sample domains - not intended to work. I'm pm you my site.

thanks for the quick response.

tankman
04-02-2008, 12:21 AM
I've posted this question in google coop forums as well and haven't received any advice.

tankman
04-03-2008, 04:00 AM
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=blah&cx=01671...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

tankman
04-03-2008, 10:01 AM
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.

ddadmin
04-04-2008, 08:12 AM
Please pm me a link to the problem page.