poleposters Posted April 25, 2008 Share Posted April 25, 2008 Hi all, I've been learning PHP and a little javascript for a couple of months and am just investigating ajax. I have list of items on my page and what I'd like to do is, when a customer adds one of the items on the list to the shopping cart, for the items to appear on one of the side divs without refreshing the page. Is this something that can be achieved with Ajax? If so, can anyone explain in broad terms how this could be achieved? (I can learn to do the scripting myself) Cheers. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted April 26, 2008 Share Posted April 26, 2008 Yes this is possible. You would create an XMLHttpRequestObject, make each item active an Ajax function to send the data to a php file, therefor inserting the data, then printing it out, then taking the response and displaying in the <div id="shopping_items"></div> Its pretty hard to explain without any coding. Quote Link to comment Share on other sites More sharing options...
poleposters Posted April 27, 2008 Author Share Posted April 27, 2008 No, you explained it great. I just needed to know exactly what I needed to investigate. I'll come back with some code if i have any troubles. Cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.