Hi,
Steve wrote:
Asp.NET 2.0
For a button control I have set the following:
OnClientClick="return confirm('Are you sure you want to do this?');"
Of course the 'OK' and 'Cancel' buttons come up for the user.
However I am developing this page in another language and I don't want
it to say 'OK' or 'Cancel', I want to be able to specify the text for
each button. Any ideas?
alert, input and prompt were created mostly for debugging purposes in
the good ol' times where we didn't have any client-side debuggers. I
wouldn't use them anymore if you can avoid it.
I posted some code a long time ago showing how to use a pop-up to do
what you want. I wouldn't really use that code anymore (pop-ups are
questionable due to pop-up blockers and to their ugly look), but maybe
you can get an idea by looking at the code.
Nowadays, I would use an absolute positioned DIV to simulate the alert box.
Here is the old code:
http://www.galasoft-lb.ch/myjavascri...000090401.html
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