Results 1 to 3 of 3

Thread: Fixed iFrame popup?

  1. #1
    Join Date
    Aug 2006
    Location
    The land of vikings
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Fixed iFrame popup?

    Hi,

    First of all, my website is a PHP website, but I guess what I need can be done with simple HTML.

    I got too many news listed on the index site, so I need some kinde of "archive" where people can scroll through older news. The way I want to do this, I want a link that, when you press it, a popup window comes up in a fixed size (and with an iFrame in it) where people can scroll through the old news.

    I guess its pretty simple, but I'm a beginner at this, and I have never played around with iFrames... Any help will be very appreciated!

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    First, you would create the iframe page, call it newsarchive.htm (or whatever). In this page, you could bring up the iframe by putting in your html:

    Code:
    header stuff
    
    <iframe name="archive" id="archive" src="archive.htm" scrolling="auto" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100&#37;; height:100%;"></iframe>
    
    footer stuff
    Then use javascript to open that page in a new smaller window:

    Code:
    <A HREF="#" onClick="window.open('newsarchive.htm','archive','resizable,height=500,width=650,scrollbars=no'); return false;">News archive</a>
    You can set the height and width to whatever you want. Since it's an iframe, you would probably set scrollable to no. However, the iframe within this smaller page would still scroll.

    Make sure you iframe page will work in the smaller dimensions.

    One other thing, you might want to add copy for people who turn javascript off to just open the archive in a new window. People with javascript turned on won't see this:
    <noscript>Please enable javascript or go <a href="newsarchive.htm" target="_blank">here</a></noscript>
    Last edited by Veronica; 06-11-2007 at 05:37 PM.

  3. #3
    Join Date
    Aug 2006
    Location
    The land of vikings
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks alot! Thats just what I needed.

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
  •