|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
#1
|
|||
|
|||
|
Hi, your tutorials are really helpful to me . i have a problem ( challenging with for some days ) when i used this tab script (http://www.dynamicdrive.com/dynamici...suppliment.htm ) and i include other PHP files through tabs my only problem is that JavaScript in that file will be disabled and can not be read .
more explanation : i have JavaScript files that are included in each of my php files . when i include php files in tab script and click on the tab the javascript in that php file can no be read . any suggestion would be appreciated . |
|
#3
|
|||
|
|||
|
thanks, I guessed that solution and i switched to using Iframe ( my only problem is how to create preloading for Iframe )
I used ( onload ( sth) ) but with no appropriate result. It would be fine if you explain how to create a preload function for Iframe . tanks |
|
#4
|
||||
|
||||
|
One way to preload the IFRAME contents it to load them inside invisible IFRAMEs when the page first loads. Inside the ajaxtabscontent.js, below the following line, add the lines in red to do this:
Code:
this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
if (this.tabs[i].getAttribute("rel")=="#iframe"){ //preload IFRAME contents
document.write('<iframe src="'+this.tabs[i].href+'" style="position:absolute;left:0;top:0;visibility:hidden"></iframe>')
}
|
|
#5
|
|||
|
|||
|
I add your codes to the js file but to make it clear :
i want this code to be appear in tab section : ddajaxtabssettings.loadstatustext="<img src='ajaxtabs/loading.gif' /> Requesting content..." so there would be no difference between Iframe and ajaxcontent My question is where to add it ? |
![]() |
| Bookmarks |
| Tags |
| ajax tabs content, preload iframe contents |
| Thread Tools | Search this Thread |
|
|