Yes/No dialog box in Javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BillGatesFan

    Yes/No dialog box in Javascript

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

  • Ulrik Skovenborg

    #2
    Re: Yes/No dialog box in Javascript

    BillGatesFan wrote:[color=blue]
    > Is there a Yes/No dialog box in Javascript? Thanks
    >[/color]

    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

    }

    Comment

    • Randy Webb

      #3
      Re: Yes/No dialog box in Javascript

      BillGatesFan wrote:
      [color=blue]
      > Is there a Yes/No dialog box in Javascript?[/color]

      Yes.
      [color=blue]
      > Thanks[/color]

      Welcome.

      --
      Randy
      comp.lang.javas cript FAQ - http://jibbering.com/faq

      Comment

      • Bill Gates Brother

        #4
        Re: Yes/No dialog box in Javascript



        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!

        Comment

        • Randy Webb

          #5
          Re: Yes/No dialog box in Javascript

          Bill Gates Brother wrote:[color=blue]
          >
          > There is![/color]

          There is what?
          [color=blue]
          > I thought Confirm() puts OK and Cancel on the dialog box?[/color]

          It does.
          [color=blue]
          > You can put Yes or No?[/color]

          On what? You asked if there is a yes/no dialobg box, I said yes. I said
          nothing about a confirm now did I?
          [color=blue]
          > How?[/color]

          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.javas cript FAQ - http://jibbering.com/faq

          Comment

          • Randysajerk

            #6
            Re: Yes/No dialog box in Javascript

            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!

            Comment

            • Randy Webb

              #7
              Re: Yes/No dialog box in Javascript

              Randysajerk wrote:[color=blue]
              > Randy you might be the biggest ass I have ever seen at a forum.[/color]

              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?
              [color=blue]
              > Congrats[/color]

              Why thank you.

              [color=blue]
              > *** Sent via Developersdex http://www.developersdex.com ***
              > Don't just participate in USENET...get rewarded for it![/color]

              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.javas cript FAQ - http://jibbering.com/faq

              Comment

              • Santosh shukla

                #8
                Re: Yes/No dialog box in Javascript



                Dim retValue as Integer
                cmdButton.Attri butes("onClick" ) = "vbScript: retValue =
                MsgBox('Demo',v bYesNo,'Save Changes?')"


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

                Comment

                • Nate N

                  #9
                  Re: Yes/No dialog box in Javascript

                  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.javas cript



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

                  Comment

                  • Richard Cornford

                    #10
                    Re: Yes/No dialog box in Javascript

                    Nate N wrote:[color=blue]
                    > 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.javas cript[/color]

                    If a category is listed as ">FORUMS & Newsgroups" and followed by the
                    qualification ">Newsgroup s" 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.


                    Comment

                    • Richard Cornford

                      #11
                      Re: Yes/No dialog box in Javascript

                      Richard Cornford wrote:
                      <snip>[color=blue]
                      > ... access to a new server (...[/color]
                      ^
                      <snip>

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

                      Richard.


                      Comment

                      • Dr John Stockton

                        #12
                        Re: Yes/No dialog box in Javascript

                        JRS: In article <41ea944c$1_1@1 27.0.0.1>, dated Sun, 16 Jan 2005
                        10:20:28, seen in news:comp.lang. javascript, Nate N <norrish@gmail. com>
                        posted :[color=blue]
                        >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.javas cript
                        >
                        >
                        >
                        >*** Sent via Developersdex http://www.developersdex.com ***
                        >Don't just participate in USENET...get rewarded for it![/color]


                        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.demo n.co.uk/news-use.htm> : about usage of News.
                        No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

                        Comment

                        • Randy Webb

                          #13
                          Re: Yes/No dialog box in Javascript

                          Nate N wrote:
                          [color=blue]
                          > Randy,
                          > Maybe you should check the definition for the word "forum" before
                          > stating this is not one.[/color]

                          I know precisely what a "forum" is. And this is NOT a forum. This is
                          Usenet News, comp.lang.javas cript specifically.

                          [color=blue]
                          > My eyes keep wandering off to the header of
                          > this reply page, where I notice:
                          >
                          > ASPdex > FORUMS & Newsgroups > Newsgroups > comp.lang.javas cript
                          >[/color]

                          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.
                          [color=blue]
                          >
                          > *** Sent via Developersdex http://www.developersdex.com ***
                          > Don't just participate in USENET...get rewarded for it![/color]

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


                          --
                          Randy
                          comp.lang.javas cript FAQ - http://jibbering.com/faq

                          Comment

                          • ryan.a.johnston@gmail.com

                            #14
                            Re: Yes/No dialog box in Javascript

                            > Dim retValue as Integer[color=blue]
                            > cmdButton.Attri butes("onClick" ) = "vbScript: retValue =
                            > MsgBox('Demo',v bYesNo,'Save Changes?')"[/color]

                            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.

                            Comment

                            Working...