Hi,
Darrel wrote:
You can use the JavaScript confirm method to create an alert box with on
OK
and Cancel button on it. The method returns true if the OK button was
clicked, and false otherwise. You can use this with a client-side event
handler to either allow the event or disallow it.
So, sounds like I should just co-opt the autopostback javascript, modify to
add the alert, and then attach that manually (register it) to the DLL.
Thanks!
-Darrel
I would use alert, confirm and the likes with care. They were actually
developed at a time where not debugger was available for client-side
JavaScript, to help developers to debug their code. Their main
disadvantage is that they usually (but not in every browser
consistently) block the execution of the JavaScript code. If an alert is
displayed, no JavaScript can be executed, thus no web method can be
called, for example. This can be a killer in some cases.
As an example, we have a web application which uses web services to
lease licenses from the server. When the license expires, another user
can lease it and work wth the application. Thus, it's very important
that the lease s renewed periodically, or else the user might lose the
license and its privileges. For this reason, we forbid our developers to
use alert or other blocking dialogs.
Additionally, another disadvantage of these dialogs is that they look
ugly, cannot be styled, and look different in each browser. It's way
better (and doesn't cost much time) to develop your own, preferably
using a floating DIV, or if you can't, using a pop-up.
I have a (very old) example of an alert box using a pop-up here:
http://www.galasoft-lb.ch/myjavascri...000090401.html
Not state of the art anymore, but it works. Today I would implement that
differently.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:
http://www.calcutta-espoir.ch