parametr trzeci w poniższym ciągu oznaczony jako '1' wskazuje na ilość.
W jaki sposób należałoby przerobić to zapytanie, aby ta funkcja była wprowadzana za pomocą <input type="text" value="1"> ?
<input type="submit" class="button_buy" value="" onclick="vpb_add_to_cart('10','2.00','1','add');" />
function vpb_add_to_cart(item_name,item_price,quantity,status) { $("div.checkout_user_info").hide(); $("div#checkout_user_info").hide(); $("div.shopping_cart_status").show(); $("div#shopping_cart_status").show(); var dataString = "item_name=" + item_name + "&quantity=" + quantity + "&item_price=" + item_price + "&page=add_to_cart";; $.ajax({ type: "POST", url: "vasplus_programming_blog_shopping_cart_v4.php", data: dataString, beforeSend: function() { $("#response").html('<span style="font-size:12px;color:#fff;">Proszę czekać...</span><br clear="all" /><br clear="all" /><img src="la.gif" align="absmiddle"> '); }, success: function(response) { $("#response").html(response); } }); }