Hi,
When a user clicks on the button delete, I want a dialog box to appear, to confirm the delete. I can get the dialog box to appear on page load, but am running into problems getting it to appear on a button click instead:
<?php echo $this->dialogContainer(
'dialog',
'Are you sure you want to delete this postcode?',
array(
'autoOpen' => false,
'draggable' => true,
'modal' => true,
'resizable' => true,
'title' => 'Confirm Delete',
'closeOnEscape' => true,
'buttons' => array(
'Delete' => new Zend_Json_Expr('function() {
document.location=\''.$this->url(array(
'module' => 'crm',
'controller' => 'postcode',
'action' => 'delete'
),"", true) .'\'
}'),
'Cancel' => new Zend_Json_Expr('function() {
$(this).dialog(\'close\');
}')
),
),
); ?>
Is there something in the dialogContainer that allows this, or do I need to create a separate function, which I load separately?
Thanks.