Results 1 to 4 of 4

Thread: ajax tabs content

  1. #1
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default ajax tabs content

    Hello, i'm using the ajax tabs content (found here http://www.dynamicdrive.com/dynamici...axtabscontent/)

    Just wondering if there was a way only allow the "external.html" pages to load within the script? and to redirect if this is the case..

    Thanks guys.

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

    Default

    Assuming you're using the IFRAME mode to display "external.htm", you can add a simple script inside the later to check that the page is being loaded within a FRAME, and if not, redirect to the main page showing Ajax Tabs Content. So inside "external.htm", you'd add something like:

    Code:
    <script type="text/javascript">
    
    if (parent.frames.length==0){ //if not being viewed inside frame
     location.replace("http://mysite.com/ajaxtabs.htm")
    }
    
    </script>
    This doesn't work if the external page is being included using Ajax, however.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    nikomou (08-13-2008)

  4. #3
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    thanks, but i am not using the iframe. pages are called using ajax.

  5. #4
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    just thought i'd check, and this does work even if the pages are called using ajax! thank you!

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
  •