#1 (permalink)  
Old 10-10-2005, 03:47 PM
Registered User
 
Join Date: Oct 2005
Posts: 5
iframe sizing issue

I am having a problem dynamically sizing an iframe. I have three iframes running on the same page each can be a different size depending on the content inside them, so I need to size them after they get all their required info. I added this to the bottom of each jsp that runs in the iframe... one jsp per iframe.

<script type="text/javascript">parent.document.all.participantCost.st yle.height = document.body.scrollHeight + 10;</script>



But this doesn't work all the time in IE it works like a charm in FireFox. Please help.

Thanks in advance
Larry
Reply With Quote

  #2 (permalink)  
Old 10-11-2005, 05:10 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
I am not sure if "document.all" is supported by IE. I use IDs, they seem to work in every browser (so far), and even on the mac.

Like this:
Code:
<iframe id="foobar">...</iframe>
And the javascript:
Code:
document.getElementById('foobar').style. = andsoon...;
Hope this helps,
Till
Reply With Quote
  #3 (permalink)  
Old 10-11-2005, 09:01 AM
Registered User
 
Join Date: Oct 2005
Posts: 5
Still not working

I tried document.getElementById('myFrame').style.height = document.body.scrollHeight + 10;

but it still doesn't size the iframes right every time. Anymore ideas

Thanks
Reply With Quote
  #4 (permalink)  
Old 10-12-2005, 12:47 PM
Registered User
 
Join Date: Oct 2005
Posts: 5
Problem solved

Well I finally figured out my problem. Each jsp contained in their respective iframe must have one table tag that encompasses that whole particular jsp page. Now each iframe is sizing correctly. This was not an issue in FireFox. Just IE. Lesson learned I guess.
Reply With Quote
  #5 (permalink)  
Old 10-12-2005, 04:10 PM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
Quote:
Originally Posted by lterry12
Well I finally figured out my problem. Each jsp contained in their respective iframe must have one table tag that encompasses that whole particular jsp page. Now each iframe is sizing correctly. This was not an issue in FireFox. Just IE. Lesson learned I guess.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
disabling scrolling of any variety within an iframe, or is it not possible? dimeric Programming and Scripting 3 10-16-2005 03:26 PM
Iframe issues BarneyXP Programming and Scripting 1 09-07-2005 03:57 AM
iframe problem. swapnil Programming and Scripting 0 07-20-2005 07:11 AM
Complicated iframe targetting problem... citizenpaul Programming and Scripting 1 03-21-2005 06:34 PM
Using Iframe in a text box lmayer Programming and Scripting 1 02-15-2005 06:18 PM


All times are GMT -5. The time now is 06:05 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter