JQuery `live()` and `submit()` problem-Collection of common programming errors
I wanna do something like this, but this one looks like happing for infinite times.
$("form").live("submit", function() {
if($(this).attr('action') != "ajax"){
$(this).submit();
return true; // even i do this!! but form is NOT submited!!
}
else { /* doing the ajax stuff! */ }
});
in Chrome and Firefox after a while the form gets submitted, something like 10seconds and in IE it crashes !
I know when i say form.submit means that i am submitting this and get called function again and again, how can i avoid this ?