This was supposed to be incredibly quick and simple. To prevent the administrator of the website from accidentally deleting content from the site, I made a pop up confirmation box that asks the user if they are sure they want to continue. Below is the code:
*Bunch of HTML and PHP
<script language=”JavaScript” type=”text/JavaScript”>
<!–
function confirmation() {
var select = confirm(“Are you sure you want to delete this?”);
if (select == true){
document.delete1.submit();
}
}
//–>
</script>
*Bunch more code
<form name=”delete1″ action=”test.html”>
[INDENT][/INDENT]<input type=”hidden” name=”del” value=”<?=$edit_id?>” />
[INDENT][/INDENT]<a href =”#” onclick=”confirmation()”>Delete</a>
</form>
Mozilla does nothing when the OK button is hit, while IE is telling me the object ‘delete1’ is null. Help is much appreciated.