I have the following text input in a form:
<input name="imagen" type="text" id="imagen" class="form-control" placeholder="<?php echo $lang['IMAGE_ITEM']?>" value="" readonly >
The input value is given an external script. So far so good.
Now I want to launch an action when the text changes, I am trying with this:
<script>
$( document ).ready(function() {
$('input[id$=imagen]').bind("change", function () {
alert($(this).val());
});
});
</script>
But no alert and no warning at the console are thrown when the input text changes.