Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Refresh Iframe Problem

Featured Replies

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.

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.

  • Author

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.

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...

  • Author

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

  • 1 year later...

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

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.