$('#equipmentNumber, #description').keyup(checkSubmit);
$('#type, #department, #location').change(checkSubmit);

function checkSubmit() {
   $('#submit').attr('disabled', !($('#equipmentNumber').val() &&
        $('#description').val()  && $('#type').val()  &&
        $('#department')  &&
        $('#location').val() ));
}





On Jan 9, 10:11 am, Chuk <violinssoundc...@gmail.com> wrote:
> Awesome!  Thanks for the suggestion that I probably should have
> assumed to be true, JQuery Lover.  I just have one more question
> concerning this.  Currently, I have the following code:
>
> $('#equipmentNumber').keyup(function()
> {
>   $('#submit').attr('disabled', !($('#equipmentNumber').val() &&  $
> ('#description').val()  && $('#type').val()  && $('#department')  && $
> ('#location').val() ));
>
> });
>
> $('#description').keyup(function()
> {
>   $('#submit').attr('disabled', !($('#equipmentNumber').val() &&  $
> ('#description').val()  && $('#type').val()  && $('#department')  && $
> ('#location').val() ));
>
> });
>
> $('#type').change(function()
> {
>   $('#submit').attr('disabled', !($('#equipmentNumber').val() &&  $
> ('#description').val()  && $('#type').val()  && $('#department')  && $
> ('#location').val() ));
>
> });
>
> $('#department').change(function()
> {
>   ('#submit').attr('disabled', !($('#equipmentNumber').val() &&  $
> ('#description').val()  && $('#type').val()  && $('#department')  && $
> ('#location').val() ));
>
> });
>
> $('#location').change(function()
> {
>   $('#submit').attr('disabled', !($('#equipmentNumber').val() &&  $
> ('#description').val()  && $('#type').val()  && $('#department')  && $
> ('#location').val() ));
>
> });
>
> Is there a way that I can combine the functions?

Reply via email to