Hi
I have an EditUser.jsp which has a form, with multiple users, the id for each is submitted to a DeleteServlet via the form action "deleteUser". A request forward after the delete redirects the user back the list of users, the functionality all works.
However, there can be a case where the logged in user can attempt to delete themselves, Ive blocked this on the back end, but I would like to render a popup on the front end to say this.
I managed to hook up a AJAX call, but this would not open the popup, and would display the message on the page transition I mentioned above, from the form action.
Some snippets below:
main.js
DeleteUserServlet.java
showUsers.jsp (just a snippet of the form)
The for I hoped for was, hit delete -> check the user -> if loggedin user -> show popup -> user dismisses popup
ARE THERE ANY BETTER SOLUTIONS! I know nothing about JS, or JQuery, this small project is to try and learn so...
Any help appreciated.
My source for trying to implement this is from:
webpage
The strange thing is, when I use the chrome dev tools and type the function name in the console, it works, just when running the app, it wont open the