Note: The $$row{id} syntax is Perl, which interpolates the value of $$row{id} into
the onClick string at run-time, i.e. when the Delete link HTML is generated as a
response to an Ajax call.
The Javascript function delete_person_note(id) is defined globally.
And yes, the '#' in that link is the '#' referred to in the error message.
The solution below will make it clearer.
o Elsewhere in the CGI form I had code to add a note.
o Immediately after displaying all existing notes, I could delete any number of them,
one at a time, by clicking on the corresponding Delete link.
o However, after adding a note, the list of notes was updated by being returned from
the Ajax call which added the new note to the database.
This includes regenerating the list of Delete and Update links (on the server) and using
jQuery to empty() the div holding the list, and calling append(html) with the new list.
o The solution:
Part 1: At the bottom of the form, I now have: |