PDA

View Full Version : Dont Reload external content in Tab



ojsimon
07-11-2008, 07:17 PM
1) Script Title: FF1+ IE5+ Opr7+Tab Content Script (v 2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem:
How can i make it so external content shown in the tabs does not reload everytime i reclick on it?

Thanks

ddadmin
07-11-2008, 09:31 PM
Well, Tab Content Script doesn't support IFRAME content by default. Or do you mean Ajax Tabs Content script (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm) instead?

ojsimon
07-11-2008, 09:39 PM
yeh sorry

ddadmin
07-12-2008, 08:15 PM
Well, whether or not the IFRAME page is cached when you click on the same tab repeatedly depends partially on how your server caches web pages. But as far as the script is concerned, the following line is what loads the page into the IFRAME:


window.frames["_ddajaxtabsiframe-"+contentdivid].location.replace(pageurl) //load desired page into iframe

You can try modifying that to:


window.frames["_ddajaxtabsiframe-"+contentdivid].location=pageurl //load desired page into iframe

to see if it helps cache the requested page on subsequent requests.

ojsimon
07-12-2008, 10:50 PM
what i mean more is that if you show google with search results on one tab and then click on one of the links, then click another tab when you click on the first tab again you would be on the liked site.

Thanks

ojsimon
07-19-2008, 10:01 AM
Do you have any ideas? what i want is say i was on tab 4 which is google, i search for nokia, then i click on tab 3. How would i make it so that if i click on tab 4 again i will still be on the nokia search results page instead of googles homepage?

Thanks

ojsimon
07-19-2008, 10:36 AM
also, how do you make the size of the iframe bigger? ive made the div bigger by putting a height into the div.

Thanks

ddadmin
07-20-2008, 07:05 AM
Ah, so you're actually asking how to persist the page loaded in the IFRAME for the various tabs that use IFRAME mode. There's no easy way with Ajax Tabs Content script unfortunately, as the script actually destroys and recreates a new IFRAME instance whenever the tabs are clicked on to ensure the page shown in the IFRAME isn't cached moving from tab to tab.

Regarding adjusting the IFRAME's height, check out this thread for a mod that does that: http://www.dynamicdrive.com/forums/showthread.php?p=132566

ojsimon
07-20-2008, 07:47 AM
so there is no way to stop the frame reloading?

ojsimon
07-20-2008, 02:17 PM
Thanks for the resize that worked well but is there no way to stop the content being destroyed after you click on a different tag and reload it? also with my site the css seeps through onto one of the sites on the iframe, how can you fix this?

Thanks

ojsimon
07-21-2008, 06:45 AM
Anyone?

ddadmin
07-22-2008, 03:33 AM
As mentioned, there's no easy way I can think of to do this with Ajax Tabs Content unfortunately. What you're asking basically requires re-writing the way the IFRAME feature behaves in the script, to be opposite of what it is now.