Hello, i don't use this method to send my datas, but in my opinion, the value of the element of type button is not get by the serialize method. If you want to send the value of the button click, you can add that after the serialize. As you have a method by button, this works ;)
data: $(this).closest('#REQUESTFORM').serialize()+'&respond='+$(this).attr('value'), Maybe val() works on button too, but i'm not sure Pierre 2009/8/19 efet <efetun...@gmail.com> > > User's data posted once user click either of buttons with same > name="respond" different values "Confirm" and "Ignore". My problem > here, button's values are not posted when I use jquery as in the > following codes. Is there a way to fix this? > > > $("[name='respond']").live('click', function() { > $.ajax({ > type: "POST", > data: $(this).closest > ('#REQUESTFORM').serialize(), > url: "content/requests/index.cs.asp? > Process=RespondRequests", > success: function(output) { > alert(output); > //$(this).closest('#REQUESTFORM').html > (output); > }, > error: function(xhr){ > alert('Request Status: ' + > xhr.status + ' Status Text: ' + xhr.statusText + ' ' + > xhr.responseText); > } > > }); > }); > <div class="tools"> > <form method="post" action="content/ > requests/index.cs.asp?Process=RespondRequests" id="REQUESTFORM"> > > <input type="hidden" > name="REQUESTID" value="<%=objRequests("REQUESTID")%>"> > <input type="hidden" > name="BYID" value="<%=objRequests("BYID")%>"> > <input type="hidden" > name="TOID" value="<%=objRequests("TOID")%>"> > <input type="button" > name="respond" value="Confirm" class="btn_confirm" /> > <input type="button" > name="respond" value="Ignore" class="btn_ignore" /> > > </form>