Now, I have seen the
core.jsbut unfortunately I cannot make them work as I would like to. I would like to add a JS function to a button that will call the phpbb.confirm, that shows the confirm message and captures the response, and then depending on the response, either executes the action, or cancels it. Up to there, I was able to make it work as expected using
phpbb.confirm. My problem is on trying to inform the user of the "success" or "failure" of the operation (that phpbb.confirm does not do). Note that this action is NOT an Ajax call, it is just plain JS code. I have tried to call phpbb.alert at the end of the function that executes the action, after the call to phpbb.confirm, a number of combinations. But I cannot make it work properly.
My main "inspiration" has been Kasimi's "Mark forum/topics read" extension, that does almost exactly what I wanted, but using an Ajax call as action, that is the one that opens the alert dialog when done. Not my case, unfortunately.
Any help, or sample code that I can look at? Thanks a lot!!