?
Solved

confirm box with Yes and No options

Posted on 2006-06-16
3
Medium Priority
?
1,303 Views
Last Modified: 2012-08-14
how to make a confirm box with Yes and No buttons instead of Ok and Cancel in javascript.
0
Comment
Question by:jayvit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 200 total points
ID: 16919837
For IE only>

<HTML>
<HEAD>
<TITLE>Confirm</TITLE>
<script language="VBScript">
<!--
Function makeMsgBox(title,message,icon,buttons,defButton,mode)
   butVal = icon + buttons + defButton + mode
   makeMsgBox = MsgBox(message,butVal,title)
End Function
// -->
</script>
<script language="Javascript">
function confirmDelete(){
  //http://www.webreference.com/dhtml/column22/js-vbMsgBox.html
  var retVal = makeMsgBox("Confirmation","Delete Record?",48,4,256,4096);
  // which button was pressed?
  if(retVal == 6){
    alert('Delete prcessing');
    return true
  } else {
    alert('Delete aborted');
    return false
  }
}
</script>
</HEAD>
<BODY>
<form>
<INPUT TYPE=button Value="Delte" onClick="alert(confirmDelete())">
</BODY>
</HTML>

0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 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