I am trying to warn a value using jquery when it is generated from javascript code, the value is generated in the input field, the problem is that jquery cannot detect changes, the commands I tested are "change, input", but when I manually inject triggers jquery values
code example:
dynamically generated in javascript and placed / inserted in the input field, the value is not manually generated by
JavaScript:
document.getElementById("displayDID").value = DisplayName ;
HTML:
<input type="text" id="displayDID" />
JQuery
$('#displayDID').on("input" ,function() {
var work = $(this).val();
alert(work);
});
id = "displayDID" changes, but jquery cannot detect it after execution.
sample script http://jsfiddle.net/SU7bU/1/