/**
* Menu callback for our AJAX
*/
function dialog_example_ajax_callback($ajax) {
// If we're using JavaScript, display the content within the dialog.
if ($ajax) {
// Construct the dialog's content.
$content = dialog_example_page();
// Options that are passed to the jQuery UI dialog. See the jQuery UI
// website for more available options: http://jqueryui.com/demos/dialog/
$options = array(
'height' => '600',
'width' => '700',
'position' => 'center',
'modal' => 'true'
);
$commands = array();
$commands[] = dialog_command_display($content, $options);
ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
}
else {
// If the user isn't using JavaScript, just show the normal page.
return dialog_example_page();
}
}