roberto68 Posted March 5, 2015 Share Posted March 5, 2015 (edited) I've form consisting of multiple fileds and I need to disable sumit button unless user fill smth in those fileds ( all of the requiered ones). I've smth like this $(document).ready(function() { $("#submit").attr('disabled', 'disabled'); $("#eventName").keyup(function(){ // treba prerobit if($(this).val() != '') { $("#myText").keyup(function(){ if($(this).val() != '') {if (document.getElementById("start").value() !=""){ // mozno tiez (function){ but this is not dong the work. wouldn't be smth like while(1) and chcek if every filed is filled ( .val() !='') - wtih some timer ? Edited March 5, 2015 by roberto68 Link to comment Share on other sites More sharing options...
roberto68 Posted March 5, 2015 Author Share Posted March 5, 2015 for everyone else here's the answer http://stackoverflow.com/questions/28408357/disable-form-button-unless-all-text-input-fields-are-filled-in Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now