Simple question I can’t seem to get right. I have a form #formOne, I need to alert it’s data. Something isn’t working,
$("#formOne").submit(function(){
alert("you are submitting" + data);
)};
If not data what do you use after +?
Thanks!
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.
You can use
.serialize()to see what the POST string looks like:Make sure that
#formOneis the form itself, so thatthisrefers to the<form>element when serializing. For debugging you may always want to try this instead (using Firebug or Chrome):This will print out as an array of objects with a
nameand avalueproperty, a bit easier to read, at least to me.