[jQuery] Forms Plugin - Button Id

2010-02-04 Thread neojquery

Hi

I am using the Forms plugin to do an Ajax submit , and I have two button on
the page I need to know which one has been clicked and trigger an event
based on this. I am not sure how to do this, this event shouldnt stop the
form posting or anything but just need to know which one is clicked.

Some code 

$(this).ajaxSubmit({
dataType: 'json',
resetForm: false,
beforeSubmit: function(formData, form, opts) {

$('input[type=submit], input[type=image]', 
this).attr('disabled',
'disabled');

},
success: function(json) {
$('input[type=submit], input[type=image]', 
this).removeAttr('disabled');

$('#form').submit();
}
}
});
-- 
View this message in context: 
http://old.nabble.com/Forms-Plugin---Button-Id-tp27452251s27240p27452251.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] Forms Plugin - Button Id

2010-02-04 Thread Nathan Klatt
On Thu, Feb 4, 2010 at 9:21 AM, neojquery w.as...@rocketmail.com wrote:
 I have two button on the page I need to know which one has
 been clicked and trigger an event based on this.

http://api.jquery.com/click/

Nathan