javascript - pass id from php while loop to jquery -


i have form has select boxes. form has table , each row has been created php while loop database. example

<select name="1265483" id="1265483" class="form-control"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option>   <select name="5894253" id="5894253" class="form-control"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> 

the id of each select entry's id in database. want ids make onchange function send id ajax.

you can use like:

$("select").change(function () {     $this = $(this);     $.post("some/url/dot.php", {data: $this.attr("id")}, function () {         // code...     }); }); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -