Right now I have a script that will update once the submit button is clicked but how would I change it so it will update as they click?
Jquery
$(function() {
$('#cartUpdate').submit(function() {
var url = $(this).attr('action');
var data= $(this).serialize();
$.post(url, data, function(cartUpdateDone) {
//tell them it updated
});
return false;
});
});
html
<form action="/cart/update" id='cartUpdate' method="post" accept-charset="utf-8">
<input type="hidden" name="rowid[]" value="76ea881ebe188f1a7e7451a9d7f17ada" />
<input type="text" name="qty[]" value="1" maxlength="3" size="5" />
</form>
EDIT:
I am sorry I guess my question was not clear enough. What I am doing is making a checkout page where I want the user to just be able to type the amount of the product they want and it goes to the cookie and updates it. Right now the user has to click a submit button to achieve this. Essentially I want to not have the submit button.
I believe your looking for the keyup event. Just change submit to keyup