Forum


18:09

10/09/2010

Hello,
I feel a little bit lost using jqgrid to save data modified with an edit form.
I work with joomla. I'm a beginner with jquery, ajax (that's why I'm lost !!). Despite of reading a lot of web pages about the topic, I don't know how to process ...I hope my english is not to bad and that you will understand my need.
So, my problem is :
I have a grid, I select a row, a form is displayed with some of the fields + 2 new ones => that's ok.1
What I want to do on the form is :
Enter a number of credits in field 1 + debit (or credit) in field 2.
When I click on save, I want to :
1) Calculate the new value for credits (add/subtract field 1 to the field 'previous credits')
2) Update the DB with this new value for the selected row.
3) Insert a row in another table (log) to track the operation.
4) Display a message (ok/nok) + Refresh the grid with the new credit value
I don't know how to start...
What function should I have to invoke first ?
Should the keyword 'editurl' be equal to the path/name of my model which contains the update order ? If the insert order is in another model, how to do ? How to call the function update_table and send the data needed to these models ?
The update will be done via ajax, how to do to make it secure ?
If someone had a full example to share (or links), it will be nice !
Thanks a lot for you help
Thierry
Most Users Ever Online: 715
Currently Online:
72 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66