I need help debugging $.post
Here's my code. I've tried 2 different approaches for posting data to "process_customer_review.asp"
- $.post("process_customer_review.asp", $("#frmCustomerReview").serialize(),function(data){
alert(data);
alert("POSTED");
});
- $.post("process_customer_review.asp",
{ task: taskVal, partid: partidVal, rating: ratingVal, first_name: first_nameVal, last_name: last_nameVal, profession: professionVal, requesttype: requesttypeVal, state: stateVal, email: emailVal, nickname: nicknameVal, review: reviewVal },
function(data){
alert(data);
alert("POSTED");
}
);
I want to be able to detect what is being sent to "process_customer_review.asp"
In both cases I get the pop-up from alert("POSTED"), but the data that is popped-up from alert(data) is not what I expected...especially in the 2nd bit of code.
At the end of the day, I want to make sure all of the form fields are getting sent to "process_customer_review.asp" so i can use request.querystring there to process that data and move forward. Right now "process_customer_review.asp" isn't processing and I'm just trying to figure out where the problem exists.
"process_customer_review.asp" worked fine with a regular form post, but I am trying to implement the jQuery $.post for a better customer experience.
I'm a jQuery newbie so I'd appreciate any/all suggestions!