Yes/No dialog box in Javascript

U

Ulrik Skovenborg

BillGatesFan said:
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

}
 
R

Randy Webb

Bill said:
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?

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.
 
R

Randy Webb

Randysajerk said:
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?

Why thank you.


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.
 
R

Richard Cornford

Nate said:
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.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 16 Jan 2005
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


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.
 
R

Randy Webb

Nate said:
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.

Where are my rewards? I should get double, nah triple, rewards for
educating DD's users.
 
R

ryan.a.johnston

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top