I was wondering if this is a bug or not ... here's the full example:
http://andric.us/media/tmp/jquery-form.html
I would think the submit button data would also be included when doing
$(form_obj).serialize()? Apologies if this has already been answered
somewhere already. It can easily be remedied by including some extra
hidden fields but I thought I would ask about it.
The code looks something like:
<script type="text/javascript">
function postSubmit(data) {
$('#messages').text(data);
}
$(document).ready(function(){
$('input[type="submit"]').click(function(event){
var data = $(this.form).serialize()
$('#messages').text(data);
//$.post("", data, postSubmit);
return false;
});
});
[snip]
<ul>
<li>
<p>Here's a form with just a submit button:</p>
<form action="" method="post">
<ul><li>
<input type="submit" name="update_project" value="Update" /
>
</li></ul>
</form>
</li>
<li>
<p>Here's a form with some hidden fields:</p>
<form action="" method="post">
<ul><li>
<input type="hidden" name="build" value="0044" />
<input type="hidden" name="push_build" value="Deploy" />
<input type="submit" name="push_build" value="Deploy" />
</li></ul>
</form>
</li>
</ul>
[snip]
TIA,
--
Milan