The pleasure of cracking something
Made AJAX to work with our libraries. It is simple,
I borrowed the ideas from the above tutorial for the AJAX implementation.
It is a gift to understand complex concepts and it is a greater gift to explain to others in understandable terms. Thanks to Bill Bercik for his time/effort in writing the tutorial. http://www.webpasties.com/xmlHttpRequest/
- You create an xml-http object (Javascript)
- Call a function on change/blur event of the source field which connects to the server with the source field id and fetches the xml formatted values for the destination fields. (Javascript)
- Write a file in the server to generate values for destination fields based on the source id received from the request and send them in xml form. (PHP)
- Assign the values to the destination fields in the client (Java Script)
- Created an ajax.inc files to include the javascript code in any page as a function call.
- Pass the variables (url of the responding php script, source field, destination fields as an array) to the function.
- Modified the generateSelectMenu code and input tags to include an id tag.
- That is it, it works like a charm.
I borrowed the ideas from the above tutorial for the AJAX implementation.
It is a gift to understand complex concepts and it is a greater gift to explain to others in understandable terms. Thanks to Bill Bercik for his time/effort in writing the tutorial. http://www.webpasties.com/xmlHttpRequest/

0 Comments:
Post a Comment
<< Home