+ Start a Discussion
Skip KSkip K 

Embedded VF page on a pagelayout - javascript confirm

I have an embedded VF page on a pagelayout. I have a button on that VF page that calls javascript that invokes jQuery confirm.
            var $g = jQuery.noConflict();
			$g('head').append('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/2.5.1/jquery-confirm.min.css" type="text/css"/>');
			
			var html = '<select style="width: 100%" . . . 
			$g.confirm({
			    title: 'Title',
			    content: html,
			    confirm: function() {
The popup modal comes up very ugly in the section of the pagelayout. I want it to popup outside of the pagelayout section and behave like a normal popup modal does for the entire page.

Any suggestions are much appreciated.
 
srlawr uksrlawr uk
That is tricky, because the included VF page is in an iFrame seperating it from the parent window.

I would perhaps try, on your
 
$g.confirm({
})

add an attribute of
 
autoOpen: false

and then when you click the button.. agh, erm, crickey, maybe something like:
 
parent.$("#confirm").dialog("open");

​to get it to open on the parent window??? any help?!