lulu50
asked on
Remove "close" word from my dialog box
Hi,
my dialog box has the word "close" on top right
how can I remove it?
Thanks,
my dialog box has the word "close" on top right
how can I remove it?
Thanks,
$(function () {
$('#dialog').dialog({
autoOpen: false,
width: 800,
height:600,
resizable: true,
title: 'Product',
modal: true,
open: function(event, ui) {
$(this).load("@Url.Action("RulePartialView", "CareAdvanceBusinessRules")");
},
buttons: {
"Close": function () {
$(this).dialog("close");
}
}
});
$("#opener").click(function (event) {
event.preventDefault();
$("#dialog").dialog("open");
});
});
<div id="dialog" title="Basic dialog"> </div>
<a id="opener" href="@Url.Action("RulePartialView", "CareAdvanceBusinessRules")">Click to open popup window </a>
Remove it by eliminating lines 12-16.
Change it by editing the word "Close" on line 13.
Change it by editing the word "Close" on line 13.
ASKER
the button close code is for my button
I want to keep it
but I see the word "close" on the top right side of my dialog box that i need to remove it or change it from "close" to "x"
I want to keep it
buttons: {
"Close": function () {
$(this).dialog("close");
}
}
but I see the word "close" on the top right side of my dialog box that i need to remove it or change it from "close" to "x"
I'm no jQuery programmer, but I'm suggesting this:
buttons: {
"X": function () {
$(this).dialog("close");
}
}
buttons: {
"X": function () {
$(this).dialog("close");
}
}
ASKER
Paul
that made my button "X" but what I want to change is the top right "close" not my button
I attach a picture of my dialog box
look at the top right side where you'll see the word "close" that's what I want to change.
popup-window.png
that made my button "X" but what I want to change is the top right "close" not my button
I attach a picture of my dialog box
look at the top right side where you'll see the word "close" that's what I want to change.
popup-window.png
ASKER
I found a solution to it
I added this code and my "close" top right disappeared
I added this code and my "close" top right disappeared
closeOnEscape: false,
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm glad you were able to solve your problem. Sorry I couldn't be of more assistance.
ASKER
Paul
Thank you for all your help:
this is what I have for the final result:
$(function () {
$('#dialog').dialog({
autoOpen: false,
width: 800,
height:600,
resizable: true,
title: 'Product',
modal: true,
open: function(event, ui) {
$(this).load("@Url.Action( "RuleParti alView", "CareAdvanceBusinessRules" )")
$(".ui-dialog-titlebar-clo se").hide( );
},
buttons: {
"Close": function () {
$(this).dialog("close");
}
},
closeOnEscape: false,
});
$("#opener").click(functio n (event) {
event.preventDefault();
$("#dialog").dialog("open" );
});
});
Thank you for all your help:
this is what I have for the final result:
$(function () {
$('#dialog').dialog({
autoOpen: false,
width: 800,
height:600,
resizable: true,
title: 'Product',
modal: true,
open: function(event, ui) {
$(this).load("@Url.Action(
$(".ui-dialog-titlebar-clo
},
buttons: {
"Close": function () {
$(this).dialog("close");
}
},
closeOnEscape: false,
});
$("#opener").click(functio
event.preventDefault();
$("#dialog").dialog("open"
});
});
ASKER