View Full Version : Loading 2nd set of Ajax Tabs

06-27-2007, 05:12 AM
1) Script Title: Ajax Tabs Content script

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

3) Describe problem: First of all, thanks for puting this out there for us to use. It is a very big help. ;)

:confused: I have put a second set of Ajax Tabs on one of the external pages that the first set of Ajax Tabs calls. The second set of Ajax Tabs will not load its exteral page into its respective "contentarea" on that page. Inserting the rev="ajaxtabs.js" into the link that calls the Dog external page does not seem to work. :eek:

Using the demo for example, lets say I click on the Dog tab and on the Dog page is another set of tabs that calls another external page that loads into its uniquely id'd "contentarea" of the Dog page. The second set of Ajax Tabs on the Dog page refuses to load its external page into its uniquely id'd "contentarea" inside the Dog page.

Oh and I have put startajaxtabs("maintab","maintab2") in the right place on the intro page. And the paths to the external files are all correct.

What am I doing wrong? Is there a way to do this? Thanks in advance!:cool:

06-28-2007, 05:53 AM
The problem is basically that pages fetched via Ajax cannot contain JavaScript. In your case, you're trying to embed the Ajax Tabs script in one of the external pages fetched via Ajax.

You can try to overcome this limitation by dynamically loading the JavaScript/ CSS on the external page using the technique mentioned near the bottom of the script page, titled "Loading external .js or .css files associated with an external page." (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/) It may or may not work though, as there are other subtle issues that may come into play.

06-28-2007, 08:29 AM
Thanks for replying. I have tried loading both the css and js files via the rev attribute in the link to the external page but that did not work either. Unless someone has a better idea I will have to drop this script and look for another solution. :( Thanks again.:(

07-17-2007, 11:34 AM
i have the a external page in ajax tabs loading, with another instance of ajaxtabs on that , it loads fine but when you click on the tabs they load in a full window instead of inside the div area, is this what you are talking about here, if so im not sure what how to implement what you explained at the bottom of the page with the rev= etc