Well, I will be the lone wolf here I guess. The "standard Drupal" way is to use the delete_confirm dialog API, which you can find documented in http://api.drupal.org.
Have you even tried a search on drupal.org? I am certain that you would find your answers there.
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: mahesh gajabar <mahesh143an@gmail.com> To: development@drupal.org Sent: Wed, January 12, 2011 1:37:59 AM Subject: [development] creating pop-up window for delete and edit actions in table in module file
Hi,
I have written a custome module table for showing some information which is fetched from database and every row is having edit and delete actions. Both are working fine. But whenever I click on on edit or delete action action it opens in other window leaving current page. I want these actions to be taken place in pop-up window.
return confirm_form($form, t('Are you sure you want to delete this doctor?'), isset($_GET['destination']) ? $_GET['destination'] : "doctor", t('This action cannot be undone.'), t('Delete'), t('Cancel')); }
function doctor_delete_confirm_submit($form, &$form_state) { $form_values = $form_state['values'];
if ($form_state['values']['confirm']) { $doctor =
$form_state['values']['_doctor'];
$query = "DELETE FROM {doctor} where doctorid= $doctor->doctorid"; $rs = db_query($query); drupal_set_message(t('Doctor has been deleted successfully.')); } drupal_goto("doctor"); }