Suppose that a user creates a webpage. Now he has a webpage, which contains an IFrame and a Button. Once the user presses the button, he/she needs the IFrame to be reloaded/refreshed. How are we going to make this possible? We are going to be finding it in the article.
The following syntax is work for both cases, where the IFrame is provided & loaded from the same domain, and where the IFrame is not from the same domain.
NOTE: In Firefox, if you are going to use window.frames, it might not be indexed by id. So you have to index it by index or name.
When we load the code:
- Refresh a page using PHP
- HTML | DOM Location reload() Method
- How to refresh a page using jQuery?
- How to reload page after specific seconds in jQuery ?
- How to set fullscreen iframe?
- HTML | DOM IFrame name Property
- HTML | <iframe> name Attribute
- HTML | DOM IFrame Object
- HTML | <iframe> src Attribute
- HTML | DOM IFrame src Property
- Remove border from IFrame using CSS
- HTML | <Iframe> frameborder Attribute
- HTML | <iframe> longdesc Attribute
- HTML | DOM IFrame contentDocument Property
- HTML | DOM IFrame sandbox Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.