page keeps on posting to iframe when removed
works perfectly but the main page keeps loading once the iframe is removed. Any know why and how i can terminate the loading?
thought this would work but didn't
<script type="text/javascript">
$(document).ready(function () {
window.name = "main";
$("#uploadSubmit").bind("click", function () {
//edit below to suit
var src = "uploader.php";
//end
var results = '<iframe src="' + src + '" name="uploader" id="uploaderIframe"></iframe>';
$("#uploader").append(results);
$("#uploadResult").html('Uploading please wait... <img src="images/loader.gif" />');
$("#uploaderIframe").load(function () {
var iframeHtml = $('#uploaderIframe').contents().find("body").html();
$("#uploadResult").html(iframeHtml);
$("#uploaderIframe").remove();
main.execCommand('Stop');
main.stop();
});
});
});
</script>
精彩评论