Results 1 to 7 of 7

Thread: JS of External Pages Don't Work !

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

    Default JS of External Pages Don't Work !

    1) Script Title: Ajax Tabs Content Script (v 2.0)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/

    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/
    Last edited by Walid; 02-03-2008 at 06:33 PM.

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

    Default

    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.

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    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

  4. #4
    Join Date
    Feb 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks guys but I did not understand !

    any simple example pls ?

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

    Default

    Basically, the script supports both an Ajax and IFRAME mode. Use the IFRAME mode to load this particular page:

    Code:
    <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>
    </ul>

  6. #6
    Join Date
    Feb 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks boss ...

    i ll try & tell you about my result

  7. #7
    Join Date
    Feb 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Perfect ... 10/10

    thanks boss

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
  •