Reputation: 310
function refreshIframe() {
var ifr = document.getElementsByName('rightTrail')[0];
ifr.src = ifr.src;
}
<iframe id="rightTrail" name="rightTrail" scrolling="no" src="resources/JSP/RightTable.jsp" class="col last" width="300px" frameborder="0">
</iframe>
<div style="float: left;">
<button id="refershButton" type="button" onclick="refreshIframe()">Get The Latest Data</button>
</div>
above code of refreshing the iframe is working fine in chrome not in IE.Please help
Upvotes: 0
Views: 2701
Reputation: 63
Please try:
document.getElementById('iFrame').contentDocument.location.reload(true);
Upvotes: 1