How to debug server-side php that responds to XMLHttpRequest |
Site Admin
|
to start debugging for calc.php, you have to inform debugger that it should start. Please read FAQ on how to start debug sessions. There are many ways, btw. The simpliest is to add DBGSESSID with appropriate value into URL (or submit it as a POST variable).
POST variables work with embedded IE browser only. |
||||||||||||||||
_________________ The PHP IDE team |
Resolved: Here's how I got it to work. |
|
Even with the documentation, and advice, it took a lot of fiddling to get it to work, but here's what I had to change:
First, I changed a statement in the controlling HTML file with javascript from theRequest.send(outtext ); to theRequest.send('DBGSESSID=1;d%3D1&' + outtext ); Note that this is a POST, and outtext consists of a varname=values string and that theReqest is an XMLHttpRequest. Next, with phped running, I opened the HTML file in FireFox, and pressed the button that causes the XMLHttpRequest to be executed, and it worked. I tried with a number of other browsers, including the built-in browser, and Safari, and they did not work. |
||||||||||||
|
Site Admin
|
different browsers are running different objects for ajax requests. Please consult with for example XOAD or any other widely spreaded open source ajax library sources.
|
||||||||||||
_________________ The PHP IDE team |
How to debug server-side php that responds to XMLHttpRequest |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by