Putting your code in the onReady() function means that it will only run one time - when the page is ready. I assume that your intention is the check the two values each time the fields are entered or modified. So, you want something like this:
The above code will compare the values of the two input fields as the user types in each field. #button1 will be enabled when both fields are identical.
oh sorry for the confusion, what I was trying to say was if the two emails are not matching, and I click on the button twice, the button goes to the next page (as if there were no conditions).
Is it possible to use the “required“ function to make sure the button won’t take me to the next page unless the two emails match?
@Yisrael thank you for explaining the required property.
the button works if I click on it a couple of times, even if the two emails don’t match. Im not sure how or why exactly the button does not remain disabled for the entirety of the time.
@bateef OK, so something must be going on. I’ll take a peek. Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor.Please include the name of the page involved.