To press button (and activate the underlying action sequence) when a text input contains a specific text, put the following code to your app’s JavaScript window. Modify your screen and variable names accordingly.


function onScreenShown(CurrentScreen) {

if (CurrentScreen === 's1') {
var input1 = document.getElementById('s1_i1');

input1.addEventListener("change", function() {
var str1 = input1.value;
if (str1.indexOf('X') !== -1) {
var button1 = document.getElementById('s1_b2');
P55ButtonClick(button1);
}
});

}
}

Skip to toolbar