Yes/No Messagebox

Discussion in 'Javascript' started by Mark C, Jan 3, 2007.

  1. Mark C

    Mark C Guest

    Mark C, Jan 3, 2007
    #1
    1. Advertisements

  2. if (confirm('Like cookies?')) { document.write('you like cookies!') }
     
    Bart Van der Donck, Jan 3, 2007
    #2
    1. Advertisements

  3. Mark C

    Erwin Moller Guest

    With Messagebox you mean the thing that confirm() produces, right?
    The answer is no.
    Rephrase your question to OK/Cancel.

    Regards,
    Erwin Moller
     
    Erwin Moller, Jan 3, 2007
    #3
  4. In comp.lang.javascript message <[email protected]
    6.168.3.44>, Wed, 3 Jan 2007 19:51:42, Jim Land
    Twice, porsche should be Porsche.

    ISTR that someone recently proposed a method based on popping up a new
    page with appropriate wording and buttons. If that works well, it
    should be referred to and the code could be given in a Note.

    Alternatively, ISTM that previously-hidden yes/no buttons on the base
    page could be unveiled instead of using a confirm box. Of course, that
    would not have the same modality.

    <input type=button onClick="X.style.display='inline'; NO.focus()">
    <span ID=X style="display:none background:red;"> ">
    <input ID=NO type=button onClick="alert(0) ; X.style.display='none'">
    <input ID=AY type=button onClick="alert(1) ; X.style.display='none'">
    </span>
     
    Dr J R Stockton, Jan 4, 2007
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.