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?
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?
If user clicked OK, the value is not null.
If user clicked Cancel, the value is null.
var p;
p = prompt('What is your age ?','');
if (p == null) {
alert('Cancel was clicked.');
}
else {
alert('OK was clicked.');
}
Bart Van der Donck said the following on 1/13/2006 11:28 AM:
Chris Ashley wrote:
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?
If user clicked OK, the value is not null. If user clicked Cancel, the value is null.
Hello,
If you set the flag for an overwrite prompt using the 'Save' common dialog,
how do you read the response when the user clicks the Yes or No in the
'overwrite' message box?
Everything...
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...
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...
Hi,
I'm trying to use c# to pop up a dialog box when a user attempts to close
word to prompt them if they want to exit or cancel (obviously other stuff
needs to happen based on their selection...
My question is closely related to http://www.thescripts.com/forum/thread444945.html and was not answered there, so I figured I'd revive it since I think I have the same issue.
Here is my...
Greetings,
I was wondering if there was a way to make prompt() calls in Safari
show a single-line input box instead of the default multi-line prompt
that it currently does.
It seems like most...
Hello -
I have the following code to detemine a file name when my application
is saving a file. The problem is that if the file already exists and
I select the Yes button in the "Do you want to...
I need to know how can I exclude a data item from the Alert Window’s list message if the user leaves a prompt window blank.
Example :
If the user types a value to both “idnumber” and...
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,...
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,...
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...
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...
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...
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,...
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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 ...