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

Thread: Dont Reload external content in Tab

  1. #1
    Join Date
    Jan 2008
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Dont Reload external content in Tab

    1) Script Title: FF1+ IE5+ Opr7+Tab Content Script (v 2.2)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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

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

    Default

    Well, Tab Content Script doesn't support IFRAME content by default. Or do you mean Ajax Tabs Content script instead?

  3. #3
    Join Date
    Jan 2008
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    yeh sorry

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

    Default

    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:

    Code:
    window.frames["_ddajaxtabsiframe-"+contentdivid].location.replace(pageurl) //load desired page into iframe
    You can try modifying that to:

    Code:
    window.frames["_ddajaxtabsiframe-"+contentdivid].location=pageurl //load desired page into iframe
    to see if it helps cache the requested page on subsequent requests.

  5. #5
    Join Date
    Jan 2008
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Jan 2008
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by ojsimon; 07-19-2008 at 10:11 AM.

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

    Default

    also, how do you make the size of the iframe bigger? ive made the div bigger by putting a height into the div.

    Thanks

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

    Default

    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/s...d.php?p=132566

  9. #9
    Join Date
    Jan 2008
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    so there is no way to stop the frame reloading?

  10. #10
    Join Date
    Jan 2008
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

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
  •