So I have two form input fields which are mutually exclusive to each other(User can only type in any one of the two fields). I use onKeyUp event on these fields to disable each other.
Once user types in the data and hits the submit button I make an Ajax call to refresh screen content and at this time the typed in field still contains the data typed prior to Ajax call but the other input field is no more disabled (as onKeyUp event never triggered).
I tried using Dojo’s addOnLoad event but and then checking for the length of Input fields but thats throwing an undefined error on input field.
Any suggestions how to fix this scenario?
PS: This page doesn’t have a body tag and I can’t add one either to use body onLoad event.
So I have two form input fields which are mutually exclusive to each other(User
Share
I’m assuming in Dojo you have smth similar to handle your Ajax call
Then on complete handler –
handle, which will fire both on success or error, you can re-disable the input