473,394 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Change 'ok' and 'cancel' to some other text

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?

May 27 '06 #1
4 1342
You can't. The locale of the dialog is determined by the locale of the
system and the IE language, because Confirm dialog is a component of
Internet Explorer where you don't have direct control.

Regards,
Tasos

May 27 '06 #2
Oh ok Thank you.

May 27 '06 #3
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
May 28 '06 #4
You can't do this with the standard JavaScript function.
You could, however, make your own popup window.
Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Steve" <ba****@iranmania.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
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?

May 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JohnSouth104 | last post by:
Hi I want to warn the user that changing the selected item in a pull-down will clear some data he has already entered in a file download box. I've tried using confirm() to return true or false...
10
by: Andrew | last post by:
Hi, I have a messagebox that pops up due to an event. I did it in javascript. ie. alert("Time's up. Assessment Ended"); I want to capture the OK and Cancel events of this alert messagebox. My...
3
by: Chris Ashley | last post by:
Hi there, Does the prompt method return a value indicating which button the user pressed (OK or Cancel) ? If so, how can I access this as it just seems to return the text the user entered? ...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
2
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.