I have created a custom button on Account layout to test popping up a jQuery modal dialog box.
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')}
{!REQUIRESCRIPT('/js/functions.js')}
{!REQUIRESCRIPT('/resource/jQuery/jquery-1.8.2.min.js')}
{!REQUIRESCRIPT('/resource/jQuery/ui/jquery-ui-1.9.1.custom.min.js')}
requireCssFile('/resource/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css');
function requireCssFile(filename) {
var fileref = document.createElement('link');
fileref.setAttribute('rel', 'stylesheet');
fileref.setAttribute('type', 'text/css');
fileref.setAttribute('href', filename);
document.getElementsByTagName('head')[0].appendChild(fileref);
}
var j$ = jQuery.noConflict();
var j$modalDialog = j$('<div></div>')
.html('Be Apex my friend!')
.dialog({
autoOpen: false,
title: 'My Modal Dialog',
resizable: false,
width: 400,
height: 400,
autoResize: true,
modal: true,
draggable: false
});
j$modalDialog.dialog('open');
I have been following this article as to how to issue a jQuery modal dialog box from Standard Page Layout.
http://www.valnavjo.com/blog/modal-dialog-on-a-standard-salesforce-page/
Upon clicking on this custom button I am getting the following error.
Can someone let me know what is the issue ?