BillLeeLee
[H]F Junkie
- Joined
- Jul 2, 2003
- Messages
- 13,486
It's been a while since I have done any real Javascript, and I have a fun one here.
I'm using a widget toolkit to build a multi-step web application. On each page of this webapp the user can decide to cancel the application (using a Cancel button), and they'll get redirected to the front page. However, I would like to pop up a window to the user asking them to confirm the Cancel press, just in case their hand slipped or something.
The problem is, I have no control over the Cancel button. It is generated by the widget toolkit (and I can't modify the source if I wanted to) and it already has a Javascript onClick action associated with it. I need to be able to intercept when the user clicks on the 'Cancel' button, present the confirmation window, get the confirmation, and then pass on the button's actual onClick function call if the user really wants to cancel.
Is this even possible?
If I'm missing some details, let me know. I am working with JSP if that is relevant.
Thanks!
I'm using a widget toolkit to build a multi-step web application. On each page of this webapp the user can decide to cancel the application (using a Cancel button), and they'll get redirected to the front page. However, I would like to pop up a window to the user asking them to confirm the Cancel press, just in case their hand slipped or something.
The problem is, I have no control over the Cancel button. It is generated by the widget toolkit (and I can't modify the source if I wanted to) and it already has a Javascript onClick action associated with it. I need to be able to intercept when the user clicks on the 'Cancel' button, present the confirmation window, get the confirmation, and then pass on the button's actual onClick function call if the user really wants to cancel.
Is this even possible?
If I'm missing some details, let me know. I am working with JSP if that is relevant.
Thanks!