Help asking for confirmation from a link not a form. The only thing I can find is confirmation for a form. Any help would be greatly appretiated, thanx in advance, and yes I already searched google.
old code I was using for the form but I don't know how to switch it to a link. I moved the onclick to the link though.
old code I was using for the form but I don't know how to switch it to a link. I moved the onclick to the link though.
Code:
<script language="JavaScript" type="text/javascript">
<!--
function confirmSubmit(){
title=window.document.delete.id.value
var agree=confirm("Are you sure you want to delete " + title + "?");
if (agree)
return true;
else
return false;
}
//-->
</script>
<body>
<a href="delete.php?id=$row[id]" onClick="return confirmSubmit()" class="style1">$row[etitle]</a>