Results 1 to 5 of 5

Thread: Loading the content pages of a site in an iframe without the disadvantages

  1. #1
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,363
    Thanks
    31
    Thanked 140 Times in 135 Posts
    Blog Entries
    32

    Default Loading the content pages of a site in an iframe without the disadvantages

    Author: Arie Molendijk.

    A script that loads the content pages of a site in an iframe. When the iframe is 'ready', the iframed page's URL is displayed in the main page. The address bar contains relevant info regarding the iframe's URL. The main page is static i.e. it doesn't change. It contains buttons for printing and bookmarking the iframed pages. Any iframed page that isn't accessed via the site's main page automatically puts itself on it (=on the main page), except when it belongs to a foreign domain.
    The dynamic info in the main page regarding the iframed page's URL(s) is not lost when the visitor starts using the browser's history buttons.

    Advantages:
    No need to find a way to include the navigation menu (contained in the main page) on every page of the site, since the main page 'is always there'.
    As the main page (containing the menu) never changes, there will be no flicker (white flash) on page transition.
    Scripts running in the main page will not be stopped when the visitor goes from one page to another. So, for instance, a video started by a script in the main page will not be stopped on page transition.

    DEMO here. EDIT: updated 11-26-2012 --> 11-27-2012.

    (I have submitted scripts like this one before, but this one essentially differs from the others in that the address bar and the iframe contain clearly visible info about the actual url of the pages).
    Last edited by molendijk; 11-27-2012 at 07:12 PM. Reason: Script updated

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,965
    Thanks
    16
    Thanked 305 Times in 304 Posts
    Blog Entries
    11

    Default

    That's looking realy smart Arie.

    Thanks for sharing
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,363
    Thanks
    31
    Thanked 140 Times in 135 Posts
    Blog Entries
    32

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,363
    Thanks
    31
    Thanked 140 Times in 135 Posts
    Blog Entries
    32

    Default

    I changed the link to a newer version of the script.
    The old script has certain issues related to the browser's history being unintentionally affected by the iframe-onloads.
    Old (deprecated) version HERE.
    New version HERE.
    Arie.

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,363
    Thanks
    31
    Thanked 140 Times in 135 Posts
    Blog Entries
    32

    Default

    I made another improved version of the script. (Hope it's the last revision). Printing the pages has become a lot easier. The script knows now when to invoke the native browser's print function. So alerts with info on how to print are only produced now for foreign iframed pages.
    I also inserted lines for detecting safari and distinguishing it from chrome, because chrome and safari behave differently regarding their instructions for printing and bookmarking pages.
    First (deprecated) version HERE.
    Second (deprecated) version HERE.
    Final version HERE.

Similar Threads

  1. Replies: 1
    Last Post: 09-23-2012, 09:29 PM
  2. Drop In Content Box -- How to prevent content from showing up on site pages?....
    By caclarkfrieson in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-29-2012, 03:59 PM
  3. Dynamic Ajax Content not loading jquery on pages being loaded
    By cmccarra in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-21-2010, 01:42 PM
  4. loading pages in iframe for submenu in Accordion menu
    By Goodboy in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-25-2009, 10:00 AM
  5. Loading content onto iframe
    By Kobra in forum HTML
    Replies: 2
    Last Post: 04-22-2005, 03:17 PM

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
  •