Results 1 to 5 of 5

Thread: How can I set a fixed height for the IFRAME SSI script II?

  1. #1
    Join Date
    Oct 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How can I set a fixed height for the IFRAME SSI script II?

    1) Script Title: IFRAME SSI script II

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

    3) Describe problem:

    Hi there everyone,

    Instead of hiding it from incompatible browsers, I would like to display it with a fixed height. It states in the instructions that the height is hard coded, but I can't find where it's coded at.

    How can I tell the script to use a certain height if the browser doesn't support the size-on-the-fly portion of the script?

    thanks,
    json

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

    Default

    First, set the following variable to no:

    Code:
    var iframehide="no"
    Then, edit the iframe tag to include an explicit width/height:
    Code:
    <iframe id="myframe" src="externalpage.htm" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none; width: 500px; height: 200px"></iframe>
    That should do it.

  3. #3
    Join Date
    Oct 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the same problem. What I'd really like is for the script to be supported properly in Opera though (as I use this script extensively on my sites)

    Just tried the proposed solution, however, and the only way in which the frame has any height at all in Opera is to set the iframe's height in px. However this no longer dynamically resizes the frame at all in IE.

    To fix this, specify a second height attribute outside the style tag of the iframe, and specify the same height NOT in px (ie. just 2000 or whatever) as per the post above.
    This now dynamically resizes the iframe in IE, and gives the frame a fixed height of 2000 (for eg) in FF and Opera.


    As a side-note, i thought this script was supported in FF


    ps: hi i'm new

  4. #4
    Join Date
    Oct 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi there DDAdmin, and thanks for the reply.

    Unfortunately, making the changes you suggested caused the script to stop resizing for all browsers.

    Any other ideas on how to do it?

    thanks,
    json

  5. #5
    Join Date
    Oct 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anybody at all have an idea how to get this script to use a fixed height in non compatible browsers, while keeping the dynamic sizing for compatible browsers?

    thanks,
    json

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
  •