I'm having trouble finding a way to get javascript block from execution.
I have a html form where a user enters email and password
I want to do basic validation in javascript
(1) email is entered
(2) password is entered
If both are not NULL then I call ajax (jquery - model) make a call to backend php to validate if the email and password is correct - During this period of time - I want the javascript to block from further execution.
Once the response comes from backend php, I want to unblock javascript.
Also, I want a timeout - incase backend php doesn't respond - so that I can throw a message - "server is busy. please try again later"
Could someone tell me how this can be achieved using javascript, jquery.
Much thanks in advance.
Tony
I have a html form where a user enters email and password
I want to do basic validation in javascript
(1) email is entered
(2) password is entered
If both are not NULL then I call ajax (jquery - model) make a call to backend php to validate if the email and password is correct - During this period of time - I want the javascript to block from further execution.
Once the response comes from backend php, I want to unblock javascript.
Also, I want a timeout - incase backend php doesn't respond - so that I can throw a message - "server is busy. please try again later"
Could someone tell me how this can be achieved using javascript, jquery.
Much thanks in advance.
Tony
Comment