Modal Dialog and Form Elements

Posted by James Jeffery on Stack Overflow See other posts from Stack Overflow or by James Jeffery
Published on 2010-06-11T18:35:30Z Indexed on 2010/06/11 18:43 UTC
Read the original article Hit count: 367

Filed under:
|

I have a form that contains some fields and a recaptcha box.

I have hidden the recaptcha box. The user clicks "create profile" and a modal dialog pops up with the recaptcha box. All fine.

But, how do I submit that information? I am using Javascript to create the recaptcha HTML in the modal. I have a button called "Create Profile" that has this code attatched to the onclick:

$("#form").submit()

The form data gets submitted to the create.php page, but the recaptcha info does not. Do I have to manually pass this information via the post request to create.php?

Without the modal dialog it works fine. I can't understand what's going on.

Any ideas?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery