Reputation: 5147
I may be totally wrong here, I am trying to load an iframe as soon as I submit a form. Here is the code
$("#listings-form").submit();
$("#hiddeniframe-listings-form").load(alert('done!'));
Doing this produces too much recursion
and even crashes browser, chrome or mozilla.
Upvotes: 0
Views: 635
Reputation: 666
Try commenting out the $("#listings-form").submit();
and check if you still get the too much recursion error.
Perhaps the submit event hander for #listings-form was set to call itself causing the infinite recursion.
Upvotes: 0
Reputation: 74202
.load()
accepts function reference:
$('#hiddeniframe-listings-form').load(
function() {
alert('done!');
}
);
Upvotes: 1