Ajax return only first value?
- $.ajax({
- type: 'POST',
- url: 'add_doc/getProtocolData',
- data: {
- 'client': client,
- },
- success: function (html) {
- $("#protocol_data").html(html);
-
-
- $('#protocol_data #protocol').live('click',function () {
- var numberDoc = $('#protocol_data #protocol').val();
- console.log(numberDoc);
-
-
- });
- }
-
-
- });
<input style="margin-left:5px;" id="protocol" value="9000003001" type="button">
<input style="margin-left:5px;" id="protocol" value="9000003000" type="button">
Always get 9000003001... I tried a, button, but problem is the same. BTW, i tried to put my
$('#protocol_data #protocol').live('click',function () {
var numberDoc = $('#protocol_data #protocol').val();
console.log(numberDoc);
outside of ajax function, but the problem is the same...
Thank you