How to pass an HTML Select tag using Javascript and Ajax to PHP $_POST with one (array) var when the name attribute is an array -
these links:
"how modify html select when name array using javascript"
and "how pass array html javascript?"
blinds me on if have select tags 2 or more different names like:
<select name='category[123]'> <option value='0'>off</option> <option value='1'>on</option> </select> <select name='category[456]'> <option value='0'>off</option> <option value='1'>on</option> </select> <select name='anothercategory[123]'> <option value='0'>off</option> <option value='1'>on</option> </select> <select name='anothercategory[456]'> <option value='0'>off</option> <option value='1'>on</option> </select>
you can use $("form").serialize()
posting values form.
Comments
Post a Comment