brgdotnet
asked on
How to change buttons on JQuery modal dialog box.
This is the exact code I am using to display a JQuery dialog box. It works great, however it displays two buttons. One labeled "Yes" and another labeled "No". I only need one button on
the Dialog box, and I need it to be labeled as "Ok". Is there any way to only have one button, and to have the text read as "Ok". How can I do that?
function displayDialogBox() {
$('<div></div>').appendTo( 'body')
.html('<div><h6>Alert </h6>
.dialog({
modal:true, title: 'Did not perform process', zIndex:10000, autoOpen: true,
width: '600', resizable: false,
buttons: {
Yes: function() {
$(this).dialog("close");
Reset();
},
No: function() {
$(this).dialog("close");
Reset();
}
});
function Reset()
{
// Code not shown
}
the Dialog box, and I need it to be labeled as "Ok". Is there any way to only have one button, and to have the text read as "Ok". How can I do that?
function displayDialogBox() {
$('<div></div>').appendTo(
.html('<div><h6>Alert </h6>
.dialog({
modal:true, title: 'Did not perform process', zIndex:10000, autoOpen: true,
width: '600', resizable: false,
buttons: {
Yes: function() {
$(this).dialog("close");
Reset();
},
No: function() {
$(this).dialog("close");
Reset();
}
});
function Reset()
{
// Code not shown
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you reveal more of the code?
What is the alert for?
Maybe I can suggest a different solution to get the same result.
SIncerely,
Branislav
What is the alert for?
Maybe I can suggest a different solution to get the same result.
SIncerely,
Branislav
ASKER
Thank you Sir. I will try some things and get back with you.
ASKER
Thank you. I think the Capitalization of the OK, (Instead of Ok) did the trick. Not sure. It works now though. I will dig into the guts of the code on Monday. Thank you.
ASKER