on ‎2007 Jun 21 2:46 PM
Hi,
I'm developing a BSP where the user will modify data and I'd like a popup to appear when the 'Back' button is pressed and there have been usaved modifications.
Basically it should be a popup with a 'You have modified the data. Are you sure you want to leave the page without saving?' or something like that and two buttons YES/NO (the yes button should execute an event and the no just close the popup).
Can you help me with it?
Many thanks in advance
Carles
Request clarification before answering.
Thanks Sebastian, that's what I needed. But now, how I process the event? I mean, where do I write the subsequent code for the Accept and Cancel buttons?
Many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again,
that's the best of it - you hav nothing to do
If you have your button supplied with onClick like:
<htmlb:button id="..."
onClick = "YourEvent"
onClientClick = "confirm('Do you really want to?');"
/>
... a Click will do the following:
1. confirmation dialog will be display waitig for a user action
2. a) when user clicks OK - the script returns TRUE and the request will be sent to the server
2. b) when user clicks CANCEL - the script returns FALSE and nothing happens
The BSP-eventlibrary looks automatically for these client events.
Regards,
Sebastian
(Sorry, wrote about htmlb:inputfield in my first post - I meant htmlb:button of course.)
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.