rendered paste body<script type="text/javascript">
$('#btn-open').click(function () {
var dialogId = 'dialog-' + new Date().getTime(),
$dialog = $('<div id="' + dialogId + '">Loading..</div>');
$dialog.dialog({
//params here
});
Sijax.request('populateDialog', [dialogId]);
});
</script>
<button id="btn-open">Open</button>
//PHP
Core_Sijax::registerCallback('populateDialog', function (Core_Sijax_Response $objResponse, $dialogId) {
$objResponse->html('#' . $dialogId, 'This is dialog ' . $dialogId);
});