how to change ok/cancel values of confirmation dialog box to yes/no in java script.
I am using C#.
this.btnSaveChanges.Attributes.Add("OnClick", "return ConfirmIt('" + inpHide.ClientID + "');");
My javascript is
<script type="text/javascript">
function ConfirmIt(inpHide) {
var getValue=parseInt(document.getElementById(inpHide).value);
if (getValue>0)
{
if(confirm("Do you want to send mesg to "+document.getElementById(inpHide).value +" Owners."))
{
document.getElementById("<%=hidSendNotification.ClientID%>").value="1";
return true;
}
else
{
return false;
}
}
else
{
alert("NO CHANGES DONE");
return false;
}
Loading
Amit ChoudharyPosted Mar 5, 2010, 7:56 AM
you have to use your own customize confirmation box to achieve it...
you can use jquery customized box.
here's my article on JQuery message boxes.
http://www.c-sharpcorner.com/UploadFile/vendettamit/JQuerymessageboxes12012009234120PM/JQuerymessageboxes.aspx?ArticleID=d86af8af-9cf3-42ed-af68-7de95cee5d85
Please mark the answer if it helps you.