Anyone have any idea how to hide the "Cancel" button on the addIframe dialog? I just want an "Ok" down there and can't see how to turn off that darn Cancel.
I figured out a way to do this using a jQuery call in the <body onload>. Since all the buttons in the iframedialog have the same class, you can call the parent's jQuery function (assuming you have jQuery loaded on the parent page):
In the <head> section of the file that loads in the <iframe> of the iframedialog:
<script type="text/javascript"> function fixDialogButtons() { parent.$('.cke_dialog_ui_button_cancel').hide(); parent.$('.cke_dialog_ui_button').each(function(){ var content = parent.$(this).html(); content = content.replace(/Ok/ig,'Close'); parent.$(this).html(content); parent.$(this).attr('title','Close'); }); } </script>
Re: Hiding Cancel button on addIframe dialog
Appreciate the help. Thanks
Re: Hiding Cancel button on addIframe dialog
In the <head> section of the file that loads in the <iframe> of the iframedialog:
<script type="text/javascript">
function fixDialogButtons()
{
parent.$('.cke_dialog_ui_button_cancel').hide();
parent.$('.cke_dialog_ui_button').each(function(){
var content = parent.$(this).html();
content = content.replace(/Ok/ig,'Close');
parent.$(this).html(content);
parent.$(this).attr('title','Close');
});
}
</script>
And then in the <body> tag:
<body onload="fixDialogButtons();">