View Full Version : JS of External Pages Don't Work !

02-03-2008, 05:50 PM
1) Script Title: Ajax Tabs Content Script (v 2.0)

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

3) Describe problem: Can't import Pages that content JS Codes

Hi All ....

1st many thanks for DynamicDrive work Team

I'm working with Ajax Tabs Content Script ...

how can i import an external page content other normal tabs ( Without Loading )?

i whant to add this script in the external page http://creativepony.com/demos/sliding-tabs/

02-03-2008, 07:18 PM
You can use the IFRAME option for that particular tab, so the external page is loaded in an IFRAME, which is the most versatile way to display external pages with scripts in themselves.

02-03-2008, 07:44 PM
After having inserted the iframe into the document, you can extract everything from it except the js files. So 'document.body.innerHTML+=frames['TheIframe].document.documentElement.innerHTML' won't give us the iframe's scripts. Or do you know a solution to this?

Arie Molendijk

02-03-2008, 07:51 PM
thanks guys but I did not understand !

any simple example pls ?

02-03-2008, 08:59 PM
Basically, the script supports both an Ajax and IFRAME mode. Use the IFRAME mode to load this particular page:

<ul id="countrytabs" class="shadetabs">
<li><a href="#" class="selected" rel="#default">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
<li><a href="external4.htm" rel="#iframe">Tab 4</a></li>
<li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>

02-05-2008, 08:12 PM
thanks boss ...

i ll try & tell you about my result

02-06-2008, 12:32 PM
Perfect ... 10/10

thanks boss