将动态内容传递给模态框,php和jquery

I was originally using a popup window to display dynamic information when the user clicked a button:

newwindow=window.open('popup.php?ID=' + id,'name','height=500,width=500');

I switched to a modalbox set up using this

To open the modal box I'm using openDialog($('#content')); where content is a div container.

how can I open the modal box and pass the same php file I was using in the popup window? 'popup.php?ID=' + id

thanks

You could load the content first using AJAX, opening the dialog in the complete callback

$('#content').load('popup.php?ID=' + id, function() {
    openDialog($('#content'));
});

Docs for .load()