PDA

View Full Version : Iframe resize problem



mehulmistry
05-02-2007, 01:07 PM
1) Iframe SSI script

2) http://www.dynamicdrive.com/dynamicindex17/iframessi.htm

3) Describe problem:

hi all,
I'm using above script to dynamically resize the iFrame in my page. The scripts works fine,when it loads the page with iFrame SRC attribute set at load time.
Now I also have a menu in my page, and all <a href=""> links in the menu, targets the iframe in the page.So only the iFrame is loaded with new content but not entire page.But the problem here is the size of iFrame won't resize now. It will remain same, to what it was with previous content when entire page is loaded.

I tried to solve this problem, by adding "onload=dyniframesize()" attribute to iFrame, and again calling dyniframesize(). This solved the problem, except it gives object expected error sometime.


BUT this works only for IE. Bigger problem is when I load my page in Firefox, the iFrame is not loaded.

And this is where my page fails completely. I wanted to know is this a bug in Firefox? Do I have to add something extra in script for that?

Please help. I'm going mad, solving it with firefox, but i'm not getting anywhere?

Thanks,
Mehulmistry

mehulmistry
05-04-2007, 10:46 AM
Hi all,
Can anyone really help me from above problem. I'm really in need of it.


Thanks....

Veronica
05-04-2007, 01:24 PM
The resize script can be buggy in FF, for example, if the pages being loaded into the iframe are extremely long. Also, the pages being called into the iframe and the page containing the iframe need to be on the same server, but that's true for both IE and FF.
If you provide a link to your page with the problem, we can take a look.

mehulmistry
05-07-2007, 07:19 AM
HI veronica,
Thanks for reply. But the iFrame pages that i'm loading are on the same server and from my application only. The reason for dynamically resizing it, is because the content of the page loaded in the iframe is comming from database, and will be varying at all the times, depending on the data fetched.
I'm sorry, but link to the URL is not possible as we are on testing our application on net and its solely for our client.
If you need and HTML snippets here, or some other info I can provide here, so we can have a solution for the problem.
Also is there any bug fixing patches for this script?


Thanks,
mehulmistry

mehulmistry
05-08-2007, 06:22 AM
LOL,
After a lot of head cracking in last few days, I found out why this script was not working in firefox. I don't know if this is bug in firefox or something else, but ya, correcting it, the scripting is working and iframe is blushing :-)

Well in my page, which was loading in iframe, had a main table, and that table had attribute aligin="left" set. As soon as I removed this, the script is working. Seemed like magic as I don't know the reason.I think align="left" for table is not supported.


Thanks,
MehulMistry