I have multiple forms of the nature [code] <form> <input hidden value =1> <input submit class="submit" </form> <form> <input hidden class=qty value =2> <input submit class="submit" </form>
[/code] I have the script as follows.... [code] <script language="javascript"> $(document).ready(function() { $('.submit').click(function() { var msg = $('.qty').val(); $.post("<?= site_url('cart/add_cart') ?>", {qty: msg}, function () { $('#sidebar').load('http://localhost/update_records.php'); }); return false; }); }); </script> [/code] Problem is that i whichever submit button i press it only grabs value 1. This is completely logical, I just don't know how to modify the script to get the right form... Apologies for dumb question..I will read the docs/do tuts soon..