javascript that ask yes or no

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

    #1

    javascript that ask yes or no

    Hi,

    I need a script that askes yes or no in a page. I know only how i most make
    it in a link... But i need it not in a link. Can somehelp whit this ?

    Greets Wouter


  • frizzle

    #2
    Re: javascript that ask yes or no

    i think you want a 'confirm'-dialog box.

    function AnswerMe()
    {
    if(confirm('rea lly?'))
    {
    //do this if answer is ok.
    }
    else
    {
    // do this if person pressed 'cancel'
    return false
    }
    };

    Comment

    Working...