Click here to Skip to main content
15,305,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hey. is there any way to update some iframe content in real time without refreshing the page?

here's example:

i have 2 pages

page1.html & page2.html

page1.html contains :

    <iframe src="page2.html"></iframe>

and page2.html contains : some divs or some video etc.. and when i updated that page2.html and uploaded it, so user don't have to refresh page1.html to see it. it should be refreshed by it self when there's update.


1 solution

use this....
$(document).ready(function() {
    $('#yourIframeId').contents().find('body').html('your changes in html tag formate');
Member 10749093 9-Aug-14 11:17am
how this should work i don't understand?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900