may i know how to use jquery to lock all the <input type="submit/button" .. and only allow submit when page is fully rendered?
may i know how to use jquery to lock all the <input type=submit/button ..
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because of the use case, I might approach it differently. Instead of actually disabling the buttons, I would just not allow the submit action to work until the page is loaded. This doesn’t require any changes to the existing HTML to work, and your pages won’t be rendered useless when JS is disabled:
Update: Forgot to mention to put both this and the
scripttag to load the jQuery library in your<head>if you want this solution to work. (Thanks for reminding me Mike Sherov).