1
Answer

how to change ok/cancel values of confirmation dialog box to yes/no

Kriti

Kriti

14y
6.5k
1

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;
}

Answers (1)