PennController for IBEX › Forums › Support › Enabling a button after text is entered without pressing Enter › Reply To: Enabling a button after text is entered without pressing Enter
September 21, 2020 at 4:11 pm
#6144
Jeremy
Keymaster
In that case let’s use a good old javascript function:
newTrial('test', newTextInput('testinput') .print() , newFunction( () => $("textarea.PennController-testinput").bind('keyup', e=> getTextInput('testinput').test.text(/\w/) .success( getButton('Next').enable() ) .failure( getButton('Next').disable() ) ._runPromises() ) ).call() , newButton('Next', 'Next') .print() .disable() .wait() )
Jeremy
- This reply was modified 4 years ago by Jeremy. Reason: fixed errors in code - see messages below