I understand that iframes may not be to everyones liking but i have yet to find an alternative that suits my needs on this particular occasion.
Basically I have an iframe on a site, within this frame is a php page that pulls text from mysql. Everything works great, the text is wrapped in <pre> tags which works well and using css i can wrap the text so that it fits in the frame. Everythings good until the page auto refreshes, it has to refresh automatically. When it refreshes the text wrap fails and the text disssapears out of the frame leaving me with horizontal scrollbar.
I am assuming that when the parent page oads initially the page within the frame "knows" the boundaries of the frame. When it refreshes I assume that it uses the browser window as the boundaries for wrapping the text. I have tried various things and none seem to work.
Any suggestions on how i can maintain the formatting of the page displayed in the frame after it auto refreshes. Thanks in advance.
Page 1 of 1
Refresh Iframe Problem
#2
Posted 08 April 2008 - 06:04 PM
I think there is a problem in loading the CSS, when it reloads automatically.
Are you auto refreshing the whole page or only the IFRAME ??
Please provide an online link, it will be easier for us to give you solutions.
Are you auto refreshing the whole page or only the IFRAME ??
Please provide an online link, it will be easier for us to give you solutions.
#3
Posted 08 April 2008 - 06:09 PM
Was testing it on locally but will upload and provide link asap. It is only the iframe that refreshes. When the parent page refreshes the text looks as i had planned and wraps perfectly in the iframe. When the page in the iframe auto refreshes thats when the problems start. I'll post a link asap need to set up a db and upload the page.
#4
Posted 08 April 2008 - 06:19 PM
spikemeister, on Apr 8 2008, 23:39, said:
Was testing it on locally but will upload and provide link asap. It is only the iframe that refreshes. When the parent page refreshes the text looks as i had planned and wraps perfectly in the iframe. When the page in the iframe auto refreshes thats when the problems start. I'll post a link asap need to set up a db and upload the page.
That will be much better if you post a link because without seeing the code I think its better not to guess something...
#5
Posted 08 April 2008 - 06:38 PM
No need its fixed, and its all thanks to you, to make the code easier for you to read I went to put the css in the <head> tag instead of linking to it and it works now. Don't know why, only thing i can think of is that the css was being loaded after the page had been generated, but nevermind it works and you have saved the little that remains of my hair from being pulled out. Thankyou
#7
Posted 26 May 2009 - 05:15 AM
Hi, I am having the same problem as you, can you please tell me what CSS exactly you inserted in your head tag?
Thanks a lot
Thanks a lot
- ← Placing a Flash animation (parcially) on top of a div
- CSS, XHTML/HTML & JavaScript
- CSS List Menu →
Share this topic:
Page 1 of 1
Help













