How trigger event when input's text changed by another javascript?
I have this code that it use an external calendar and changes input's text:
HTML:
<input id="myText" class="pdate"/>
<input id="submit" type="submit">
CSS:
var textBox = document.getElementById('myText');
var submitButton = document.getElementById('submit');
textBox.onchange = function () {
submitButton.disabled = true;
};
textBox.ontextchange = function () {
submitButton.disabled = true;
};
I want that Button disabled when calendar changes input's text;I tried
onchange and ontextchange,but none of those worked.
jsFiddle
No comments:
Post a Comment