javascript confirmation box

Posted on 2007-10-02
Last Modified: 2012-05-05
I have confirmation box in javascript code.By default buttons name are OK and Cancel.
I want to change buttons name as Yes or No.Is it possible inside javascript code??

 I have backup to create popup window of fixed size and display 2 buttons etc but looking for already available feature of javascript.

Question by:jdsiam
    LVL 6

    Accepted Solution

    No, but you can follow the dhtml alternative on this page:
    LVL 6

    Expert Comment

    It will allow you as many buttons as you want, let you change them, and still be scriptable.
    LVL 24

    Expert Comment

    This works in IE, but not firefox

    <script language=javascript>

    /*@cc_on @*/
    /*@if (@_win32 && @_jscript_version>=5)

    function window.confirm(str)
        execScript('n = msgbox("'+str+'","4132")', "vbscript");
        return(n == 6);

    @end @*/
    var r = confirm("Can you do it?");

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now