Reply To: Enabling a button after text is entered without pressing Enter

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

#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 3 years, 8 months ago by Jeremy. Reason: fixed errors in code - see messages below