Results 1 to 2 of 2

Thread: IFrame SSI script II - Setting Heights for Two IFrames

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

    Default IFrame SSI script II - Setting Heights for Two IFrames

    Thank you for looking at this and thank you Dynamic Drive for this great script!

    My problem relates to configuring the script to auto-set the height for two Iframes on the same page. The script is only working for one of the two Iframes and I'm not sure where I'm wrong:

    //Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
    //Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
    var iframeids=["contentframe", "contentframe2"]

    ** As you can see above, my frameids point to two different iframe IDS **

    <iframe id="contentframe" src="content/home/if1Home.htm" frameborder="0" scrolling="no" marginheight="0" width="100%" align="left"></iframe>

    <iframe id="contentframe2" src="content/home/if2home.htm" frameborder="0" scrolling="no" marginheight="0" width="100%" align="left"></iframe>

    ** As you can see above, my two iframes are formatted identically but only the top one (id = contentframe) works. **

    Any ideas? Thanks in advance for any feedback.

    Jason Sweet

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Is the id= attribute correct? Could the script possibly refer to the name= attribute instead? both work, generally, but this could be specific, I think.

    I'm not sure why it isn't working... but must be something about either setting the second frame's name in the iframeids variable.... or about the tag itself... can't be that as it's identical...

    Not really sure.

    Any chance it requires you to type your frame's name again?

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
  •