troubleshooting Question

Problem with Ajax and capturing Data after bign submitted

Avatar of Overthere
Overthere asked on
AJAXjQueryPHP
15 Comments3 Solutions156 ViewsLast Modified:
I have a small snippet of coding that uses  php and ajax.
I have created a Heredoc to capture and post the new posted data to another page.
I added an event, jqGridAddEditAfterSubmit, to my grid component (from phpgrid.com)
and it executes the heredoc but displays "undefined"  from the  alert(postData.CustomerId);
It displays my page me.php with no value in custNum.
I am developing locally, using Windows Pro 7, MS Sql Server, Express 8 and php 5.6
Can anyone help me resolve this problem?

$afterSubmit = <<<AFTERSUBMIT
function (event, status, postData)
{
    console.log(event); 
    console.log(status); 
    console.log(postData);
    alert(postData.CustomerId);
    $.ajax({ url: 'me.php',
        data: {custNum: postData.CustomerId}, 
        type: 'post',
        success: function(output) {
                    alert(output);
                }
        });
}
AFTERSUBMIT;
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros