Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Yes / No vs OK / Cancel

Posted on 2007-11-19
2
Medium Priority
?
3,007 Views
Last Modified: 2011-09-20
lbTempTest.Attributes.Add("onClick", "return confirm('Do you want to add another Debt Item?');");

This part:

return confirm('Do you want to add another Debt Item?');


Do I have different options for this?

Can I do "Yes / No" buttons instead of "OK / Caoncel"?

How does this work?
0
Comment
Question by:Tom Knowlton
[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
2 Comments
 
LVL 4

Assisted Solution

by:DavidTMoore
DavidTMoore earned 400 total points
ID: 20316708
Javascript confirms are browser specific and cannot be changed.  You will need to build a custom control to achieve this.

cheers
~David
0
 
LVL 16

Accepted Solution

by:
gnoon earned 1600 total points
ID: 20317115
>Can I do "Yes / No" buttons instead of "OK / Caoncel"?
Yes, you can.

>How does this work?
You change to this

lbTempTest.Attributes.Add("onClick", "return (makeMsgBox('Confirm','Do you want to add another Debt Item?',2,4,0,0)==6);");

Then define the makeMsgBox function on the page
<script language=vbscript>
<!--
'Make user dialog appear
'@param title title string
'@param mess message string
'@param icon 
'	0 - no icon
'	1 - red cross
'	2 - question
'	3 - warning
'	4 - information
'@param buts
'	0 - [OK]
'	1 - [OK] [Cancel]
'	2 - [Abort] [Retry] [Cancel]
'	3 - [Yes] [No] [Cancel]
'	4 - [Yes] [No]
'	5 - [Retry] [Cancel]
'@param defbut
'	0 - 1st as default
'	1 - 2nd as default
'	2 - 3rd as default
'@param mods
'	0 - Application Modal
'	1 - System Modal
Function makeMsgBox(title,mess,icon,buts,defbut,mods)
    butVal = buts + (icon*16) + (defbut*256) + (mods*4096)
    makeMsgBox = MsgBox(mess,butVal,title)
End Function
-->
</script>

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

705 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