Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

javascript confirmation box

Posted on 2007-10-02
3
Medium Priority
?
793 Views
Last Modified: 2012-05-05
Hi,
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.

Thanks
0
Comment
Question by:jdsiam
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
nathana21 earned 375 total points
ID: 20000585
No, but you can follow the dhtml alternative on this page:

http://www.codingforums.com/archive/index.php?t-3078.html
0
 
LVL 6

Expert Comment

by:nathana21
ID: 20000592
It will allow you as many buttons as you want, let you change them, and still be scriptable.
0
 
LVL 24

Expert Comment

by:mankowitz
ID: 20000600
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?");
alert(r);
</script>
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

580 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