How to call javascript function when url variable is sent
Posted
by mattlarkin
on Stack Overflow
See other posts from Stack Overflow
or by mattlarkin
Published on 2010-04-02T22:19:19Z
Indexed on
2010/04/02
22:23 UTC
Read the original article
Hit count: 173
Hello, heres basically what I need to get done.
I have a jsp page which allows me to add/modify/delete an item.
The items are stored in a database which I have controller classes to access(dont worry bout that part)
When an item gets selected and deleted the id of the item gets sent to the controller to be processed.
The item will not always be deleted if their is a foreign key constraint so I send either a delete=true or delete=false through url back to the jsp page.
I would like to have it so a javascript function gets called displaying an alert saying the item was deleted or the item was not deleted.
can someone please tell me the best way to do this? thank you
© Stack Overflow or respective owner