Hi i have two buttons in a form.
1 is called Edit; the other 1 is called Delete

when user click on Edit, i want the form to go to another page with POST.
however if user click on Delete button, i wish to run through a script to determine whether the form should be return true or false.

How can i achieve this.
Following is my script:

my form name is: order_amend
my radio button group is: booking_grp

//this script is for the Delete button. I do not wish the page to be submitted before this execution. And the form should be determined by the user.
function confirmation() {
	var len =  document.order_amend.booking_grp.length
	var bookingid;
	for(var i=0; i< len; i++){
		if(document.order_amend.booking_grp[i].checked == 1)
			bookingid = document.order_amend.booking_grp[i].value;
	var msg = "Are you sure you want to delete "+bookingid+" ?";
	var sure = confirm(msg);
	if (sure){
		return true;
		return false;


<form action="orders_amend.php" method="post" name="order_amend" target="_self">

<input type="submit" name="Edit" id="button" value="Edit" onclick="test()">

 <input type="submit" name="Delete" id="button" value="Delete" onclick="confirmation()">
please advise...