How can I find ID/Class of the current form within the ajax success function? Since there are multiple forms with the same Class, I cant simply search for the class, but need exactly the form that was submitted.
I have following script:
$('#fAddOs,#fAddFs,.addJ').submit(function(){
//$(this) = form
$.ajax({
type:'POST',
url:'admin.inc.php',
data:data,
dataType:'html',
success:
function(response){
//Get form
}
});
});
If I call $(this) within the AJAX function (see my comment in the code above), I get:
[Object { url="admin.inc.php", isLocal=false, global=true, mehr...}]
outside the ajax call, save the form to a variable that you can use inside the ajax callback.