I am trying to pick the value from the text box.
Text box id data-id data-phase data-project is dynamically generated.
<input class="addinformation" type="text" data-id="" data-phase="1_2" data-project="1" value="" style="width: 50%;" id="IMxyz_addinfo">
My js code is
var TktNo ="IMxyz";
Method 1:
console.log($(".additionalInfoBox").find("[data-id='" + TktNo + "']").html());
Method 2
console.log($("#" + TktNo + "_addinfo").val());
Both are failing....any idea
console.log("1 " + $(".addinformation").val());
console.log("2 " + $(".addinformation").find("[data-id='" + TktNo + "']").val());
console.log("3 " + $("#" + TktNo + "_addinfo").val());
console.log("4 " + $('input#' + TktNo + '_addinfo').val());
output is
1
2 undefined
3
4
when i do console.log($(".addinformation"));
following are the snap shot