<script language="VBScript" type="text/VBScript"> sub confirmDelete(toObj) Dim intKeyPress intKeyPress = msgbox("Are you sure to delete this record?", _ vbYesNo+vbQuestion,"Confirm Deletion") if intKeyPress = vbNo then toObj.href = document.location else toObj.href="http://spacefold.com" end if end sub </script> <a href="" onClick="ConfirmDelete(Me)">this is a test</a>