.live, .tabs and hjacking forms removes submit button from post data
I am not sure if this is a bug or a behavior or my code causing the problem.
Because of limitations with tabs in the UI the following bit of code essentially hijacks the forms submit button and dynamically serializes and submits data while ensuring the response goes to the correct or active tab.
- $j('.auth-form').live('submit', function() {
$j('.ui-tabs-panel:visible').html(loading);
$j.ajax({
data: $j(this).serialize(),
type: $j(this).attr('method'),
url: $j(this).attr('action'),
success: function(response) {
$j('.ui-tabs-panel:visible').html(response);
}
});
return false;
})
The reason I am asking about this behavior is because on the server side I am attempting to utilize various form submit button name values within a conditional statement.
Any help or insight is appreciated.