in reply to Catalyst client to server interaction
If correct, then what I would do is, instead of deleting the list item I would hide it or mark it in some way, and also give it a class - say 'for_delete'. Then when the delete button is clicked I would use JS to scan for any list items with the class 'for_delete', collect their ids and then send a request to the server either via an AJAX call or by appending the ids to the form and then submitting the form.
You could re-write your template something like:
You will also need to give your form a name or an id so you can select it and append the ids.[% FOREACH key IN services.keys -%] <li onclick="select(this)" id="[% key %]" class="">service : [% ke +y %] jours de repos: [%services.$key.nb_jours%] interieur : [%service +s.$key.interieur%]</li> [% END -%]
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Catalyst client to server interaction
by QuillMeantTen (Friar) on Sep 24, 2015 at 16:03 UTC | |
by Anonymous Monk on Sep 24, 2015 at 17:09 UTC |