0

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');

});
1
  • Are you loading jQuery + jQuery UI within the iFrame or the parent file? Commented Jul 14, 2011 at 11:19

1 Answer 1

2

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});
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.