Skip to content

Commit d0e782f

Browse files
committed
jquery-form#358, bind event for resident iframes!
1 parent 00ad2be commit d0e782f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

jquery.form.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 3.42.0-2013.09.02
3+
* version: 3.43.0-2013.09.03
44
* Requires jQuery v1.5 or later
55
* Copyright (c) 2013 M. Alsup
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -539,11 +539,11 @@ $.fn.ajaxSubmit = function(options) {
539539
if (!s.iframeTarget) {
540540
// add iframe to doc and submit the form
541541
$io.appendTo('body');
542-
if (io.attachEvent)
543-
io.attachEvent('onload', cb);
544-
else
545-
io.addEventListener('load', cb, false);
546542
}
543+
if (io.attachEvent)
544+
io.attachEvent('onload', cb);
545+
else
546+
io.addEventListener('load', cb, false);
547547
setTimeout(checkState,15);
548548

549549
try {
@@ -729,6 +729,8 @@ $.fn.ajaxSubmit = function(options) {
729729
setTimeout(function() {
730730
if (!s.iframeTarget)
731731
$io.remove();
732+
else //adding else to clean up existing iframe response.
733+
$io.attr('src', s.iframeSrc);
732734
xhr.responseXML = null;
733735
}, 100);
734736
}

0 commit comments

Comments
 (0)