I am trying to reload an iframe like the following:
var frameObject = $('#myFrame');
var frameAsInDom = frameObject[0].contentWindow;
var currentLocation = frameAsInDom.location;
frameObject.attr('src', 'about:blank');
frameObject.contents().remove(); // This was a desperate statement!!
frameObject.attr('src', currentLocation).load(function(){
alert('iframe reloaded');
});
The problem is the iframe’s .load event is not getting triggered at all. I am not getting the alert inside the load call back.
You are mixing the binding and triggering of the event,
See this code: http://jsfiddle.net/BvQuk/1/
HTML
JS
Hope that helps.