Simple Jform element finding question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Simple Jform element finding question

foomanchoo79
I have a search results page which displays 25 result row where each row is encapsulated in a <div id="rec">, each of those div's in turn contain a form that can be uniquely submitted(class="form_email").  When submitted I would like just the <div id="rec"> that contains the current form to change to the responseText sent back by my php file.  If I use '.form_email' as the target variable ALL of the rec divs change.  Below is my attempt to control only the rec div which contains the form being submitted. It works so much as the response comes back but no element get's updated.  I think I'm close but if someone could just tip me in the right direction I'd appreciate it.


$(document).ready(function() {
    var options = {
       target:        $(this).parents('#rec').find('.form_email')  
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse  // post-submit callback
                               
    };
 
    $('.email').submit(function() {      
        $(this).ajaxSubmit(options);
        return false;
    });
});