Hello Friends, I am new to java script. I am using it in ASP. In that I got one button to delete record. If I click on delete button it should dispaly window for confirming. I used confirm, but I want cancel to be selected by default. and if user select OK, it should execute my asp script wiht parameter. My code is as below :<img src="button_images/delete.jpg" width="61" height="22" onclick="deleteRec(<%=i%>)"></div><script language="JavaScript" type="text/JavaScript"> function deleteRec(i) { confirm("Are you sure?") if(confirm != 0) { window.location="DeleteTourismData?id=" & i } else { window.location="viewevents.asp" } }thanks