aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Reload iFrame | jQuery Refresh iFrame

Apr 24, 2013

Here I will explain how to use  
jQuery to refresh or reload iframe using jQuery. By using simple jQuery property we can refresh or reload an iframe on the page using jQuery.

In previous post I explained
jQuery count number of vowels in string, Get Screen resolution of client machine in JavaScript, split the string using split function in jquery and many articles relating to code snippets, JQuery, JavaScript. Now I will explain how to reload iframe using jQuery.

If we want to refresh or reload an iframe using jQuery we need to write the code like as shown below

//Reload iframe
$('#testframe').attr('src', $('#testframe').attr('src'));

If you want see complete example check below code

<html xmlns="">
<title>jQuery Reload iframe</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function() {
$('#btnRefresh').click(function() {
$('#testframe').attr('src', $('#testframe').attr('src'));
<input type="submit" name="go" id="btnRefresh" value="Refresh Iframe"/><br />
<iframe id="testframe" src="" width="350px" height="350px"></iframe>

To check demo change click on button

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Naresh Battul said...

Thats what i want...thank u so much suresh sir.....

mohamed ali Jinna said...

thank you suresh it works fine...

Give your Valuable Comments

Other Related Posts

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.