Function problems using .post
I recently started using JQuery after about a 3-year lapse. Needless to say, I'm quite rusty. I have a button that, when clicked, needs to send various variables to a .php file containing the appropriate function. My issue is that the button will click, any test alerts pass the appropriate values into said alert...however nothing fires off on my .php file. I'm at a loss. The function below exists inside of the $(document).ready
- $(function() {
- $( "#buttonSubmit" )
- .click(function()
- {
- $.post(
- //"../customwidgets/survey/surveyF.php",
- "surveyF.php",
- {
- "function": "sendVisitorSurvey",
- "f_dateAttended": dateAttended,
- "f_welcome": welcome,
- "f_messageFeedback": messageFeedback,
- "f_ageGroup": ageGroup,
- "f_heardAboutUs": heardAboutUs,
- "f_questions": questions,
- "f_childHasChildren": childHasChildren,
- "f_childClassAttended": childClassAttended,
- "f_childClassFeedback": childClassFeedback,
- "f_childCheckIn": childCheckIn,
- "f_contactName": contactName,
- "f_contactEmail": contactEmail,
- "f_contactPhone": contactPhone
- }
- );
- /* alert(
- "Date Attended?: "+dateAttended+"\n"+
- "Did you feel welcome?: "+welcome+"\n"+
- "Feedback on the message?: "+messageFeedback+"\n"+
- "What is your age group?: "+ageGroup+"\n"+
- "How did you hear about us?: "+heardAboutUs+"\n"+
- "Do you have any questions?: "+questions+"\n"+
- "Have Children?: "+childHasChildren+"\n"+
- "What class attended?: "+childClassAttended+"\n"+
- "Class Feedback from child?: "+childClassFeedback+"\n"+
- "Children Check In Easy?: "+childCheckIn+"\n"+
- "Contact Name: "+contactName+"\n"+
- "Contact Email: "+contactEmail+"\n"+
- "Contact Phone: "+contactPhone
- );*/
-
- });
- });