This topic is locked
[SOLVED]

 Autofill For Enable Or Disable Fields With Js

2/14/2013 10:00:51 AM
PHPRunner General questions
S
sickacid author

Hi, i've done a query with result 0,1 for use with autofill function to enable or disable fields dimanically. For example I select something in the lookup and i get the right value dinamically for enable or disable fields (value 0 or 1). I've 2 fields to enable or disalbe NS (secret number) and CT (serial number). And this query works!

But my java wont't works correctly because it enable or disable fields function works right only at the second click press. any suggestion?
TD.on('change', function(e)

{

if (NS.getValue()== '1')

{

NS.setEnabled();

}

else

{

NS.setDisabled();

}
if (CT.getValue()== '1')

{

CT.setEnabled();

}

else

{

CT.setDisabled();

}

Sergey Kornilov admin 2/14/2013

If I understand your question right - autofill doesn't trigger 'change' event handler. This event handler will be only executed when field value is changed manually.

S
sickacid author 2/14/2013



If I understand your question right - autofill doesn't trigger 'change' event handler. This event handler will be only executed when field value is changed manually.


I used on blur function instead on change and it works when i leave the field