i'm new to javascript, and so I'd like to know if there's a way to make
a prompt box, that, instead of having "ok" "cancel" and a text box,
would just have buttons of "yes" "no".
Is there a method that can do it? 3 9038
nuno silva <to******@netvi sao.pt> writes: i'm new to javascript, and so I'd like to know if there's a way to make a prompt box, that, instead of having "ok" "cancel" and a text box, would just have buttons of "yes" "no".
You are probably looking for the "confirm" function instead of "prompt".
You can not decide what text is on the buttons.
<URL:http://jibbering.com/faq/#FAQ4_28>
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
ok... I've done it. that's what I wanted. Now tell me something:
when I press ok button what result should go to a local variable?
i'm asking?
if (option == okbutton) do this ----> what should be the value instead
of okbutton?
else do that...
Lasse Reichstein Nielsen wrote: nuno silva <to******@netvi sao.pt> writes:
i'm new to javascript, and so I'd like to know if there's a way to make a prompt box, that, instead of having "ok" "cancel" and a text box, would just have buttons of "yes" "no".
You are probably looking for the "confirm" function instead of "prompt". You can not decide what text is on the buttons. <URL:http://jibbering.com/faq/#FAQ4_28>
/L
nuno silva <to******@netvi sao.pt> writes: ok... I've done it. that's what I wanted. Now tell me something:
when I press ok button what result should go to a local variable? i'm asking? if (option == okbutton) do this ----> what should be the value instead of okbutton?
I am not sure I understand the question.
The way I use the confirm function is
if (confirm("Shoul d we go on?")) {
//do something on OK
} else {
//do something else on Cancel
}
The confirm function returns a boolean, either true or false,
depending on which button you pressed.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.' This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Petesman |
last post by:
I am trying to make a prompt that will ask the user for some input...
If I just use var input = prompt("dafa") everything works fine but the
box is put in the top left corner of the window. I need it to be
centered so... I was doing some research on the net (never really used
much JavaScript before) and was reading the only way to do this is...
|
by: Hans |
last post by:
Hi!
I have an asp application where I use a lot of javascript for validations
etc and as it is today I use alert, confirm and prompt dialogs. Now we are
adding support for unicode and I have problems with the font used to present
messages in alert, prompts and confirm dialogs. If I for examle paste a
chinese value in a prompt dialog it is...
|
by: Chris Powell |
last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows
each) that I wish to create linked tables in Access rather than
importing into Access. The two source Excel files change frequently, so
I want to:
A) prompt the user, using a custom form, for the specific Excel files to
be linked;
B) create the links dynamically;
C)...
|
by: MIG |
last post by:
In Access 97 I used @ to make message boxes to separate the lines,
rather than have the message all in one line.
In Access 2000, all that happens is that "@" appears all over my
message boxes.
Is this feature in one of the libraries that isn't installed by default
in Access 2000, and if so, does anyone know which one?
|
by: Michael Goerz |
last post by:
Hi,
when my program uses system(), system("latex temp.tex") in this case,
to execute some DOS-command on Windows, I always have the prompt popping
up in front while the command is running. How can I prevent this? I
simply want to execute the command, but not see any DOS-boxes (just like
in an Linux environment).
Thanks,
| |
by: Xavier Osa |
last post by:
Hi,
I have an ASP.Net web page that you can download a file. As
Fergunson's problem, it prompts twice dialog boxes only if I select
Open button. If I select Save button, it prompts once.
I'm using W2000KS & IE6 sp1 & VS.NET 2003.
If I change method="post" by method="get" form attribute, it works
fine.
|
by: c3950ig |
last post by:
Hi,
I am python newbie and the command prompt is having an issue with
python. I installed python 2.4.4 onto my windows machine, opened a
command prompt window, and typed python to start the interactive mode.
Got the following error.
D:\>python
'python' is not recognized as an internal or external command,
operable program or batch file.
|
by: Rob Nicholson |
last post by:
I've managed to write an ASP.NET v2 web page where the prompt to save the
password doesn't appear :-( Not sure why it's not working. Autocomplete on
the text boxes is working but when you enter username, password (text box
with type = password) and click the login link button, IE doesn't popup "Do
you want to save this password?".
The...
|
by: gunter |
last post by:
I would be grateful if someone could please point out where i have went wrong in the following script. Before i wrote code windows prompted for a number of boxes, now nothing appears, but i cannot figure out where i have went wrong.
thankyou very much
<HTML>
<HEAD>
<TITLE>Volume Discount</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |