PDA

View Full Version : Tabcontent script with external pages



msaz87
12-16-2006, 12:20 AM
1) Script Title: Tab Content Script

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

3) Describe problem: I want one of the tabs to open an external page, like an iframe would. The script refers me to the "Ajax Tabs Content script" (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm) -- but I'm confused on how to exactly combine the two to function.

I appreciate anyone's help. Thanks.

ddadmin
12-16-2006, 01:18 AM
Combining the two scripts to archive the effect of being able to display both inline content and external pages would be messy. The simpliest solution I can think of is just to stick with the original Tab Content script, and for the desired tab content, embed an iframe inside it:


<iframe src="http://mysite.com"></iframe>

instead of normal inline content.

msaz87
12-16-2006, 02:02 AM
Thanks. I seemed to know the answer when I asked the question, since I even said...


like an iframe would

But for whatever reason I didn't even consider it.

In any case, thanks for your help.

vanbao
02-23-2008, 04:35 AM
I am using the tabcontent script and including the inline content is a must for me. However, I would like one of the contect to bring up an external page within the same domain.

It is possible to use the tabcontent and find a way to link to that external page

If I am asking the same quesiton that is answerred above, then how do I embed this iframe

Here is correct like this.

.<li><a href="#" rel="<iframe src="http://mysite.com"></iframe>">gifts</a></li>

Thank you.

ddadmin
02-23-2008, 09:08 AM
Hi Vanbao:
The solution to your question seems to be exactly what I had posted above already, if you're talking about Tab Content script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) that is. Basically, for one of the Tab Content DIVs, you would simply insert an IFRAME:


<div style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">

<div id="country1" class="tabcontent">
Tab content 1 here<br />Tab content 1 here<br />
</div>

<div id="country2" class="tabcontent">
<iframe src="http://mysite.com"></iframe>
</div>