gregd101
06-26-2012, 04:50 PM
Is there a way to have an event triger when a html inputField has a value set through javascript?
So for example
<input class='inputField' size="20" type='text' name='num1' onchange="doIt3();" > </td> <br>
function doIt3() {
alert("here") ;
}
function doIt2() {
var hn = document.getElementById("num1");
hn.value = "aaaa";
}
doIt2 runs it changes the value of num1. However the onchange=doIt3() will not trigger until the user goes into the field, manually changes the value and then leaves the field.
Is there an event I can trigger when the value automatically changes?
thanks
So for example
<input class='inputField' size="20" type='text' name='num1' onchange="doIt3();" > </td> <br>
function doIt3() {
alert("here") ;
}
function doIt2() {
var hn = document.getElementById("num1");
hn.value = "aaaa";
}
doIt2 runs it changes the value of num1. However the onchange=doIt3() will not trigger until the user goes into the field, manually changes the value and then leaves the field.
Is there an event I can trigger when the value automatically changes?
thanks