Note that there are some explanatory texts on larger screens.

plurals
  1. POretrive multi check box value by jquery
    primarykey
    data
    text
    <p>i was searching on the web and stack but i cant found a way to solve my problem so I hope someone can help me i have a multi check box with same name "shopitem[]" and i want to check if check box are checked then send them value as array like "1,3,5,7" to php code with ajax</p> <p>herere is my code:</p> <pre><code>&lt;form id="ShopItemForm" class="ShopItemForm" method="post" name="ShopItemForm"&gt; &lt;input class="ShopItem" checked="checked" name="ShopeItem[]" id="1" value="1" type="checkbox"&gt;1 &lt;input class="ShopItem" name="ShopeItem[]" id="2" value="2" type="checkbox"&gt;2 &lt;input class="ShopItem" checked="checked" name="ShopeItem[]" id="3" value="3" type="checkbox"&gt;3 &lt;input class="ShopItem" name="ShopeItem[]" id="4" value="4" type="checkbox"&gt;4 &lt;input class="ShopItem" name="ShopeItem[]" id="5" value="5" type="checkbox"&gt;5 &lt;input name="submitShopItem" value="submit" class="button button-push" id="submitShopItem" type="submit"&gt; &lt;/form&gt; $(function() { $("#submitShopItem").click(function(e) { e.preventDefault(); // put all checked box to array checkedArray var shopItem = $("#shop-item-Loader").html(''); $("#shop-item-Loader").html('load'); $.ajax({ type: "POST", url: "checked.php", data: "act=shopItem&amp;ShopItem="+checkedArray, cache: false, success: function(html){ alert(checkedArray); $("#shop-item-Loader").html(''); $("#shop-item-Loader").append(html); } }); }); }); </code></pre> <p><strong>i want to send all new checked value to ajax page like coma separated string</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload