473,320 Members | 1,856 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,320 software developers and data experts.

Yes/No dialog box in Javascript

Is there a Yes/No dialog box in Javascript? Thanks

Jul 23 '05 #1
13 68254
BillGatesFan wrote:
Is there a Yes/No dialog box in Javascript? Thanks


Well, sort of, but the text "Yes/No" depends on the browser:
confirm("Yes or no");

The confirm-box returns true if you say yes and false if no, so you can
do something like this:
if (confirm("Yes or no")) {//if yes

}
else { // if no

}
Jul 23 '05 #2
BillGatesFan wrote:
Is there a Yes/No dialog box in Javascript?
Yes.
Thanks


Welcome.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #3


There is! I thought Confirm() puts OK and Cancel on the dialog box? You
can put Yes or No? How?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #4
Bill Gates Brother wrote:

There is!
There is what?
I thought Confirm() puts OK and Cancel on the dialog box?
It does.
You can put Yes or No?
On what? You asked if there is a yes/no dialobg box, I said yes. I said
nothing about a confirm now did I?
How?


With script.

Write your own dialog box that uses a div tag that gets centered and you
can put anything you want in it.

Before asking for further explanation, please read the group FAQ. It
abounds with information that will be of great use to you.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #5
Randy you might be the biggest ass I have ever seen at a forum. Congrats

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #6
Randysajerk wrote:
Randy you might be the biggest ass I have ever seen at a forum.
Damn, and all this time I thought this was Usenet and now you tell me
its a forum. Thanks for clarifying that for me.

And while I may qualife for the biggest ass in Usenet (I'm not), you
would rank in the top 10 for the inability to read and comprehend what
you read. Had you bothered to read what I said, followed the links, and
read some more, you would have found the answer to your question.

Or, has Developersdex brainwashed you into thinking this is some kind of
question/answer forum where I just sit here waiting on lazy people to
ask stupid questions without researching it first?
Congrats
Why thank you.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Where do I collect my rewards? I want cyber-dollars so I can buy a
cyber-brain.

P.S. The FAQ I pointed you to is referenced in my signature.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #7


Dim retValue as Integer
cmdButton.Attributes("onClick") = "vbscript: retValue =
MsgBox('Demo',vbYesNo,'Save Changes?')"
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #8
Randy,
Maybe you should check the definition for the word "forum" before
stating this is not one. My eyes keep wandering off to the header of
this reply page, where I notice:

ASPdex > FORUMS & Newsgroups > Newsgroups > comp.lang.javascript

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #9
Nate N wrote:
Randy,
Maybe you should check the definition for the word "forum"
before stating this is not one. My eyes keep wandering off
to the header of this reply page, where I notice:

ASPdex > FORUMS & Newsgroups > Newsgroups > comp.lang.javascript


If a category is listed as ">FORUMS & Newsgroups" and followed by the
qualification ">Newsgroups" wouldn't it make more sense to assume that
the subject of that qualification was *not* a forum?

But if you want to participate in Usenet newsgroups I would recommend
that you get away form Developersdex. They used to be reasonably
competent a couple of years ago but they have completely lost the plot
recently. Your best bet is to arrange access to a new server (if you ISP
doesn't already provide one) and get some proper newsreader software (or
outlook express).

Richard.
Jul 23 '05 #10
Richard Cornford wrote:
<snip>
... access to a new server (...

^
<snip>

In case it isn't obvious, that should have been "news server".

Richard.
Jul 23 '05 #11
JRS: In article <41**********@127.0.0.1>, dated Sun, 16 Jan 2005
10:20:28, seen in news:comp.lang.javascript, Nate N <no*****@gmail.com>
posted :
Randy,
Maybe you should check the definition for the word "forum" before
stating this is not one. My eyes keep wandering off to the header of
this reply page, where I notice:

ASPdex > FORUMS & Newsgroups > Newsgroups > comp.lang.javascript

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

You are very naive; and also a careless reader. Developersdex calling
this a forum would not be sufficient to make it a forum. And, from the
structure you quote above, they do not call this a forum; it is in the
non-forums part of "forums and newsgroups".

It is an Internet Newsgroup; a public resource.

Dd is neither the best nor the worst of a number of organisations which,
to suit your own ends, have created parasitic front-ends of greater or
lesser competence, to give such as you the illusion that you are using a
service that they have built.
How are those who provide answers here to be properly rewarded? - the
ignorant questioners should be giving, rather than receiving, payment.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #12
Nate N wrote:
Randy,
Maybe you should check the definition for the word "forum" before
stating this is not one.
I know precisely what a "forum" is. And this is NOT a forum. This is
Usenet News, comp.lang.javascript specifically.

My eyes keep wandering off to the header of
this reply page, where I notice:

ASPdex > FORUMS & Newsgroups > Newsgroups > comp.lang.javascript

This image:
<URL: http://members.aol.com/hikksnotathome/reply.jpg >
is a screenshot of this reply window I am typing in. Go look at it, then
come back and tell me where it says all that hog-wash garbage you say
above.

You need to learn the difference between developersdex and usenet.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Where are my rewards? I should get double, nah triple, rewards for
educating DD's users.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #13
> Dim retValue as Integer
cmdButton.Attributes("onClick") = "vbscript: retValue =
MsgBox('Demo',vbYesNo,'Save Changes?')"


I asume you realize this, but the code you submited is visual basic
script, not javascript. VBScript should be avoided except for web
applications that are only intended to be run in Internet Explorer.

Jul 23 '05 #14

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

Similar topics

2
by: Priya | last post by:
Hi, Is it possible to set the text for a asp:label based on the value returned by the confirm dialog(javascript) from aspx page? Thanks & Regards, Priya
8
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
14
by: MartinRinehart | last post by:
I can load a dialog by loading an HTML page or by constructing the dialog with JavaScript. What should I be thinking about when I look at this choice?
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.