We will try to create a simple page with a list of items with their price and quantity. The user will be able to select any number of a particular item and that information will be sent to the server side. The server-side script will calculate the prices of selections and will show the net price to the user.
This is similar to a shopping cart as you might have seen in many sites. The difference is that a page reload will not occur and the user will have to wait less. This recipe is a basic example and you can enhance it in many ways to suit your requirements.
Create a folder named
Recipe6 inside the
Chapter6 directory. Next, under the same directory, create an XML file that will have a list of some ...