I want to open a dialog from a link i iframe,however I cannot make it pop-up a dialog anybody knows the reason?
I have a iFrame in html
<iframe src="Add_Reviewer.html" width="100%" name="test" frameborder="0" scrolling="auto" height="100%"></iframe>
My link in Add_Reviewer.html
<a href="#" id="advance_add">Advance Add</a>
My jQuery Code
var $advance_add = $('<div></div>')
.html('<iframe src="Advance_Add.html" width="100%" name="test" frameborder="0" scrolling="auto" height="100%">')
.dialog({
autoOpen: false,
bgiframe: true,
width:650,
minWidth: 650,
height: 550,
closeOnEscape:true,
modal:true,
title: 'Addvance Add',
buttons : {
"Close" : function() {
$(this).dialog("close");
}
}
});
$("#advance_add").click(function(e) {
e.preventDefault();
$advance_add.dialog('open')开发者_开发问答;
});
I am using this code:
$("#advance_add").click(function() {
$('<iframe src="Advance_Add.html" frameborder="0" />').dialog({
modal: true,
dialogClass: 'priceBox',
title: 'Your title',
height: 400,
width: 500,
draggable: false,
resizable: false});
});
精彩评论