Hi everyone.
I have the following situation:
I did copy the code from the similar werbite of my franchisor, edited it (changed input and text so that they match), however, when i implement the code, it does not work.
I spent hours thinking about it but no clue what is wrong.
Can someone help me please? Maybe i am missing something very simple i cannot think of?
Here is the code:
import wixLocation from ‘wix-location’ ;
$w.onReady( function () {
});
let debounceTimer;
export function input1_keyPress(event, $w) {
$w( ‘#text44’ ).hide();
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
setTimeout(() => {
let val = $w( ‘#input1’ ).value;
}, 10 );
console.log($w( '#input1' ).value.length)
if ($w( ‘#input1’ ).value.length > 3 ) {
if ($w( ‘#input1’ ).value === “TEST” ) {
wixLocation.to( ‘/bonus’ )
} else {
console.log($w( ‘#input1’ ).value)
$w( ‘#text44’ ).show();
}
}
}
Thank you all in advance!