Results 1 to 2 of 2

Thread: How to force a page into an iframe...but?

  1. #1
    Join Date
    Jun 2007
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to force a page into an iframe...but?

    I have a bit of a problem. I have build my website around an iFrame. There are two different versions...ala two different home pages (index.php and home.php) depending upon which version you choose at a splash screen (highband or lowband).

    Here's the problem. I need to make all of the child pages incapable of being viewed outside of it's intended iFrame. The problem is, if I use the standard Javascript for forceing a page into it's intended iFrame then I can't also let it be viewable in the alternate iFrame, depending upon user choice.

    Is there a way for the script to point to a default parent page but allow the child page to also be viewed in the alternate parent? So, if you found the page outside of my site it would always load the page into the default parent page. But if you came in the front door of my site, via the splash page you would have the option to view that same file within either of the parent pages...depending upon choice (highband or lowband).

    Is that clear???

    Thanks

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    you want a page within an iframe to only be visible within your iframe otherwise it will load your home page?
    Code:
    if (window.top.location!="http://www.yourdomain.com/containor-of-iframe.php")  {
    window.top.location="http://yourdomain.com/index.htm";
    }
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

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
  •