Great fan of you books! I've recently gone over Chapter 11 and I had a question regarding passing data from JSON to PHP using the code provided in the book for test.js (434-436). I've modified the script to use JSON and that works beautifully. I'd like to know if there is a clean JS solution to pass data to PHP without relying on jQuery.ajax({ data })?
I've looked everywhere for a solution but the solution seems easily resolved with jQuery, but I'd like to avoid that if possible.
Here is the code I've used as dictated in the book:
I would like to be able to echo out the data['org'].file and data['pre'].file in PHP after the request is made. Any guidance or suggesting would be appreciated.
Passing Ajax Data To Php With Javascript
in Modern Javascript: Develop and Design
Posted
Hi Larry,
Great fan of you books! I've recently gone over Chapter 11 and I had a question regarding passing data from JSON to PHP using the code provided in the book for test.js (434-436). I've modified the script to use JSON and that works beautifully. I'd like to know if there is a clean JS solution to pass data to PHP without relying on jQuery.ajax({ data })?
I've looked everywhere for a solution but the solution seems easily resolved with jQuery, but I'd like to avoid that if possible.
Here is the code I've used as dictated in the book:
I would like to be able to echo out the data['org'].file and data['pre'].file in PHP after the request is made. Any guidance or suggesting would be appreciated.