Hai here i want to get confirm message before delte.here i wrote two java script functions .but it is not working.it is deleting directly without asking confirmation.confirm Action function is not working.
please help me.
<html>
<head>
<title>hello</title>
<SCRIPT LANGUAGE="JavaScript">
function confirmAction(){
return confirm("Do you want to delete ?"
}
function submitForm(location) {
document.form1.action = location;
document.form1.submit();
}
</SCRIPT>
</head>
<body bgcolor="#F0FEFF">
<form action="" name="form1" id="form1" method="post" onSubmit="return confirmAction()">
............
........
............
..........
</form>
<a href="javascript:submitForm('Delete.jsp')"><img
src="delete.gif" BORDER="0" ALT="Delete"
WIDTH="100" HEIGHT="32"></a>
</body>
</html>
thank u
please help me.
<html>
<head>
<title>hello</title>
<SCRIPT LANGUAGE="JavaScript">
function confirmAction(){
return confirm("Do you want to delete ?"
}
function submitForm(location) {
document.form1.action = location;
document.form1.submit();
}
</SCRIPT>
</head>
<body bgcolor="#F0FEFF">
<form action="" name="form1" id="form1" method="post" onSubmit="return confirmAction()">
............
........
............
..........
</form>
<a href="javascript:submitForm('Delete.jsp')"><img
src="delete.gif" BORDER="0" ALT="Delete"
WIDTH="100" HEIGHT="32"></a>
</body>
</html>
thank u