Grow your CSS skills. Land your dream job.

jQuery messes up form submission

  • # July 20, 2010 at 5:27 am

    Hey guys, I’m making a contact section on my site, and when you click the submit button, it disables the inputs, textarea and fades in a little message. But it seems the jQuery stops the form from submitting the information..

    Code:
    //$(‘#submit’).click(function(){
    //$(‘input, textarea’).attr(‘disabled’, ‘disabled’);
    //$(‘#send’).fadeIn(‘slow’);
    //});

    so, when i click the button, it refreshes the page, no information is sent…

    any help will be appreciated :)

    # July 20, 2010 at 6:39 am

    disabled form items will not send any data

    # July 20, 2010 at 12:51 pm

    Dang, I was unaware, lol. thank you :)

    # July 20, 2010 at 1:10 pm

    one way to work around it to have a hidden field with the same "name" write some javascript/jquery that copies what you have in the box as you type and places it as the value of the hidden field.

    Hidden fields will submit data.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".