cheers everyone
Very Simple Question
I wrote the following
java script code. I am not sure whether it will work or not
<script>
function deleteUser(url) {
var msg = confirm("Do you really want to delete the given selected user ?")
if (msg) {window.location.href = site}
else (null)
}
</script>
I have a piece of code which I wanna use
<s:url id="deleteUrl" action="deleteUser" namespace="user">
<s
aram name="user.userID" value="userID" />
</s:url>
<s:a href="%{deleteUrl}">
<s:text name="Delete" />
</s:a></td>
But before calling the action deleteUser I want to use a confirmation message something like using the above java script. Which will promt to the user does he really want to delete the user and then I can call the deleteUser
Struts action.
Please help me on that or suggest me how should I do it. It might be easier for you but not for me.
If possible post a sample code where somebody has done something like this.
Thanks everybody for reading this post.