views:

140

answers:

2

For the below code,

there ia a form in the location /home/form.php .How can this form be opened with the below code.i.e, the modal dialog

     $dialog.html(data)
     .dialog({
        autoOpen: true,
        position: ['right','bottom'] ,
        title: 'Emp Form',
        draggable: false,
        width : 300,
        height : 400,
        resizable : false
     });
    $dialog.dialog('open');

Thanks....

+1  A: 

If you want to open existing page, you could use iframe to load the content inside your dialog box.

Assuming $dialog.html sets html content of the dialog box, you can do something like that:

$dialog.html('<iframe id="myFrame" src="/home/form.php"></iframe>')
rochal
+3  A: 

You can also use load():

 $('#dialogThing).load("/home/form.php").dialog({ ... }).dialog("open");

You'll want to be careful about initializing a dialog more than once; I can't remember whether the normal jQuery UI dialog detects that. It might of course.

Pointy