In my app I have an index page called Contacts.html. I have a form called newContactForm.php which I display on the Contacts.html page via an ajax function. When a user enters details into the form an presses submit it uses a form action to send the data to and ajax function called insert. the insert function takes the data and sends it to newContact.php which saves the data to my database table. the insert function then (onreadystatechange) triggers an ajax function called showGroup which displays all the contacts in the database on the Contacts.html page.In my app I have an index page called Contacts.