View Single Post
Old 05-22-2008, 09:07 AM   #3 (permalink)
EyeDentify
The Contributor
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 92
Thanks: 11
EyeDentify is on a distinguished road
Default

You will have to think about this in the following way:

You have 2 DIV:s

One for containing the list you wish to edit and the other one the form that adds and edits.

And when you add something to the list via a submit in the form, have the JavaScript update the DIV with the list. For the easy approach have a file called for example ajax_list.php that gets loaded into the list DIV each time something needs to be updated.

In that way if you add something new with the form the DIV with the list updates and reflects the changes.

And for the ease of editing have a file called for example ajax_edit.php containing the form code as well the PHP code for adding and saving, as well as for retrieving the data thats been selected in the list DIV and load it into the form.

Think of the to DIV:s as "iframes" that you load ordinary PHP files into with the help of JavaScript and AJAX.

Hope this wasn´t to confusing. :D

Good luck.

/Eye
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote