confirm box question

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

    #1

    confirm box question

    is there a way of changing the values of the confirm box from ok / cancel to
    yes / no

    i have the following alert/confirm box but it is worded in a way that the ok
    and cancel do not make sense:


    function confirmNewSuppl ierWelcome(){
    return confirm(
    'Before going on to request a new supplier\n'
    + 'are you sure there is no suitable alternative?'
    + '\nRemember, new suppliers are authorised by exception only'
    );
    }




  • Ivo

    #2
    Re: confirm box question

    "Craig Keightley" wrote[color=blue]
    > is there a way of changing the values of the confirm box from ok / cancel[/color]
    to[color=blue]
    > yes / no[/color]

    No, there isn't. Sorry.
    [color=blue]
    > i have the following alert/confirm box but it is worded in a way that the[/color]
    ok[color=blue]
    > and cancel do not make sense:[/color]

    You more or less provide the solution yourself: change the wording of the
    question.
    hth
    --
    Ivo


    Comment

    • McKirahan

      #3
      Re: confirm box question

      "Craig Keightley" <dont@spam.me > wrote in message
      news:4270f25b$0 $304$cc9e4d1f@n ews-text.dial.pipex .com...[color=blue]
      > is there a way of changing the values of the confirm box from ok / cancel[/color]
      to[color=blue]
      > yes / no
      >
      > i have the following alert/confirm box but it is worded in a way that the[/color]
      ok[color=blue]
      > and cancel do not make sense:
      >
      >
      > function confirmNewSuppl ierWelcome(){
      > return confirm(
      > 'Before going on to request a new supplier\n'
      > + 'are you sure there is no suitable alternative?'
      > + '\nRemember, new suppliers are authorised by exception only'
      > );
      > }
      >[/color]
      You can't change it.

      The question should be phrased so those responses make sense.

      For example,

      Click Cancel if there is a suitable alternative;
      otherwise, click OK to request a new supplier.

      Remember, new suppliers are authorised by exception only.


      Comment

      • Dietmar Meier

        #4
        Re: confirm box question

        Craig Keightley wrote:
        [color=blue]
        > is there a way of changing the values of the confirm box from ok /
        > cancel to yes / no[/color]

        In addition to the other two answers (I would recommend to rephrase
        the question, too), maybe the following thread will interest you:


        ciao, dhgm

        Comment

        • Craig Keightley

          #5
          Re: confirm box question

          Trust me, the question is not in my words and for an easy life, iw ould re
          phrase it too (it was before, but my client is very fussy!!!)

          Is there way to acheive this using VB Script?

          "Dietmar Meier" <usereplytoinst ead@innoline-systemtechnik.d e> wrote in
          message news:3dcb6rF6sc 90sU1@individua l.net...[color=blue]
          > Craig Keightley wrote:
          >[color=green]
          >> is there a way of changing the values of the confirm box from ok /
          >> cancel to yes / no[/color]
          >
          > In addition to the other two answers (I would recommend to rephrase
          > the question, too), maybe the following thread will interest you:
          > http://groups.google.de/groups?threa...2h9h%404ax.com
          >
          > ciao, dhgm[/color]


          Comment

          • James X. Li

            #6
            Re: confirm box question

            You can try to use the showModalDialog () method to display your questions.

            James

            "Craig Keightley" <dont@spam.me > wrote in message
            news:4270f9fc$0 $292$cc9e4d1f@n ews-text.dial.pipex .com...[color=blue]
            > Trust me, the question is not in my words and for an easy life, iw ould re
            > phrase it too (it was before, but my client is very fussy!!!)
            >
            > Is there way to acheive this using VB Script?
            >
            > "Dietmar Meier" <usereplytoinst ead@innoline-systemtechnik.d e> wrote in
            > message news:3dcb6rF6sc 90sU1@individua l.net...[color=green]
            > > Craig Keightley wrote:
            > >[color=darkred]
            > >> is there a way of changing the values of the confirm box from ok /
            > >> cancel to yes / no[/color]
            > >
            > > In addition to the other two answers (I would recommend to rephrase
            > > the question, too), maybe the following thread will interest you:
            > >[/color][/color]
            http://groups.google.de/groups?threa...2h9h%404ax.com[color=blue][color=green]
            > >
            > > ciao, dhgm[/color]
            >
            >[/color]


            Comment

            • Dietmar Meier

              #7
              Re: confirm box question

              Craig Keightley wrote:

              [Yes/No Box]
              [color=blue]
              > Is there way to acheive this using VB Script?[/color]

              Yes, if you target MSIE on Windows only. VBScript is not supported on
              any other platform (AFAIK). See the example below. If you implement
              VBScript in your documents, and have any intrinsic JavaScript (like
              `<element onwhatever="jsc ode">´), make sure that the VBScript block is
              not the first script block in your document, since MSIE ignores the
              "Content-Script-Type" HTTP header equivalent and interpretes any
              intrinsic script as of the type of the first script block found in the
              document ...

              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
              "http://www.w3.org/TR/html4/strict.dtd">
              <html>
              <head>
              <meta http-equiv="Content-Script-Type" content="text/javascript">
              <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
              <title>VB Yes No</title>
              <script type="text/javascript">
              function askVB(s) {
              if (typeof VBYesNoQuestion != "undefined" ) {
              return VBYesNoQuestion (s);
              }
              }
              </script>
              <script type="text/vbscript">
              Public Function VBYesNoQuestion (ByVal s)
              VBYesNoQuestion = MsgBox (s, 4, "Question") = 6
              End Function
              </script>
              </head>
              <body>
              <a href="#"
              onclick="alert( askVB('Foo Bar') + ' was returned'); return false"[color=blue]
              >test it</a>[/color]
              </body>
              </html>

              ciao, dhgm

              Comment

              • Dietmar Meier

                #8
                Re: confirm box question

                Craig Keightley wrote:

                [Yes/No Box]
                [color=blue]
                > Is there way to acheive this using VB Script?[/color]

                Yes, if you target MSIE on Windows only. VBScript is not supported on
                any other platform (AFAIK). See the example below. If you implement
                VBScript in your documents, and have any intrinsic JavaScript (like
                `<element onwhatever="jsc ode">´), make sure that the VBScript block is
                not the first script block in your document, since MSIE ignores the
                "Content-Script-Type" HTTP header equivalent and interpretes any
                intrinsic script as of the type of the first script block found in the
                document ...

                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
                "http://www.w3.org/TR/html4/strict.dtd">
                <html>
                <head>
                <meta http-equiv="Content-Script-Type" content="text/javascript">
                <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
                <title>VB Yes No</title>
                <script type="text/javascript">
                function askVB(s) {
                if (typeof VBYesNoQuestion != "undefined" ) {
                return VBYesNoQuestion (s);
                }
                }
                </script>
                <script type="text/vbscript">
                Public Function VBYesNoQuestion (ByVal s)
                VBYesNoQuestion = MsgBox (s, 4, "Question") = 6
                End Function
                </script>
                </head>
                <body><p>
                <a href="#"
                onclick="alert( askVB('Foo Bar') + ' was returned'); return false"[color=blue]
                >test it</a>[/color]
                </p></body>
                </html>

                ciao, dhgm

                Comment

                • Fred Oz

                  #9
                  Re: confirm box question

                  Craig Keightley wrote:[color=blue]
                  > Trust me, the question is not in my words and for an easy life, iw ould re
                  > phrase it too (it was before, but my client is very fussy!!!)
                  >
                  > Is there way to acheive this using VB Script?
                  >[/color]

                  You could use 'pop-up' divs that are styled to look like dialogs.
                  Then you can support any browser with JavaScript, rather than just
                  those with VBscript.

                  Try to make your client outcome focused: the intention is to
                  determine whether the user wants to request a new supplier, not get
                  them to say "yes" or "no".

                  Sticking with confirm:

                  Before going on to request a new supplier,
                  are you sure there is no suitable alternative?

                  Remember, new suppliers are authorised by exception only.

                  Click 'OK' to request a new supplier, or
                  click 'Cancel' to not request a new supplier.

                  The question is poorly worded anyway - I may not be sure, but I may
                  still want a new supplier. So no, I'm not sure but yes, I want a new
                  supplier. Hmmm.

                  Just suggestions...


                  --
                  Fred

                  Comment

                  Working...