Combobox value is previous selection, not current selection
this should simple question.
i'm using javascript on acrobat 9 , i've created combox 4 values: 1, 2, 3 , 4. i've set commitonselchange = true. i've created validation script take value entered , update field (so i'm not doing true validation, i'm using validation script capability update field based on combobox value entered).
the problem simple -- value parameter set previous value. if select "1" , select "3", validation script upon selecting "3" seeing previous "1". if select "4", validation script see previous value of "3".
how deal current value parameter upon selecting it?? don't want have click button, submit button, want select value 1 4, , process value.
in addition validation script, i've tried various javascript actions mouse down, event handlers see previous value, never current value.
i'm aware can use custom keystroke scripts somehow trigger on "event.willcommit", can't believe necessary in attempting select numeric values 1 4.
there must *some* way process combobox's current value, ideas??
thanks.
dave
it's pretty hard you're doing wrong, since haven't included of code using.
i'm guessing you're using in custom validation script:
this.getfield('textbox').value = this.getfield('combobox').value
the control's 'value' property hasn't been updated new value yet in validation script. try using event.value instead:
this.getfield('textbox').value = event.value
or, better yet, put code textfield's calculate script:
event.value = this.getfield('combobox').value
More discussions in JavaScript
adobe
Comments
Post a Comment