PDA

View Full Version : Iframes in child div don't expand parent.



avdistribution
01-12-2010, 01:32 AM
1) Script Title: Iframe SSI script II

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

3) Describe problem:
I have an iframe opening in a child div that's appended to a parent. The parent div doesn't expand to accommodate the div with the iframe. Expanding the parent or adding padding doesn't help. The script works great when placed on it's own, as does John Scheur's adaptation.
The html is a mess because I'm dealing with a site that mixes tables and css layout. The divs are within a table, if that makes a difference. Could be a site specific problem-it's built with a wysiwig editor and code added-but was wondering if there's a way to force the parent to expand to in turn allow the iframe to expand.

avdistribution
01-13-2010, 02:43 PM
I fixed this by placing the js directly on the host page instead of trying to link to it in a file, though on a different page linking to a file was working. Go figure.
Now the problem is only the first of 2 iframes on a page is working as it should in IE (6 and 8). Both work in FF.
The iframe id's are entered in the js as : ["comments5", "comments4"]
Tried it with and without a space after the comma - doesn't make a difference.
Also, in IE, when you post a comment within the iframe, it shrinks down the size of the iframe. You have to refresh parent page to get it to open up again.
You can see the test page here:
http://avdistributionllc.com/Blog2.aspx
Anybody have any idea how to get this to work on multiple iframes with IE?