hallo I get this code from a dreamweaver extension:
<script language="JavaScript" type="text/JavaScript">
<!--
function BRB_PHP_DelWithCon(deletepage_url,field_name,field_value,messagetext) { //v1.0 - Deletes a record with confirmation
if (confirm(messagetext)==1){
location.href = eval('\"'+deletepage_url+'?'+field_name+'='+field_value+'\"');
}
}
//-->
</script>
and a link looks like this:
<a href="javascript:BRB_PHP_DelWithCon('delNews.php','newsId',<?php echo $row_newsLijst['newsId']; ?>,'Ben je zeker dat deze record verwijderd moet worden?');">Del.</a>
this querystring gives the id to the delete query.