Looking for Code Example within 24 hours. It will be a model that I can use in my wordpress site. I need an ajax code example, in wordpress plugin ready form, simple and clean and short. I have a three buttons on a page "Purchase Item 1", "Purchase Item 2" , "Purchase Item 3" in customized wordpress site page that when pressed will prompt the user for a quantity in a modal dialog box and submit supplied data to the server side via an ajax request. Each Button will have it's own data "Item Number", "Item Description". For the purposes of this code example, "Item Numbers will be ABC0001, ABC0002, ABC0003. Descriptions are "A-Description", "B-Description", "C-Description" The server side script will take the data and simply serialize the posted data and send it back to the caller. When the response is returned, a <div> element will be shown under the correct button that will display the server supplied response. The page should not refresh or otherwise scroll.
"Purchased 3 of ABC0002 (B-Description)";
1. Must be a standalone plugin all contained in a single php file.
2. Must work on a vanilla implementation of wordpress
3. Come with an HTML page that demonstarates the use of the plugin.
4. I must be able to prove it's working on my website.