in keydown fuction confirm box work twice
hello
in keydown fuction confirm box works twice. how to prevent this .
below is the sample code .
<input type="button" class="button" value="Cancel" id="can_bt"
onclick ="
cancel1 ('<?php echo $i; ?>','<?php echo $_POST['ntr']; ?>')"
onkeydown="exeClick(event)" />
function exeClick(e){
var eId=$(e.target).attr("id");
if(e.keyCode==13)
{
$("#"+eId).click();
return true;
}
}
function cancel1(no,ntr){
var msg=confirm("Do you want to cancel This");
if(msg){
oTable.fnClose(ntr);
}
}
pls help
thanks & regards