please tell me what is the problem in this code if i am click OK or
Cancel same function get executed.
<script language="javascript">
function ConfirmAddRecords()
{
var agree;
window.confirm("Are U sure to save Records");
if (agree==true)
{
true ;
}
else
{
false ;
}
}
</script>
regards
Santosh Shinde
Brock Allen - 13 May 2006 20:22 GMT
You are not capturing the return value from confirm. Here's something simpler:
function ConfirmRecords()
{
return window.confirm("You sure?");
}
-Brock
http://staff.develop.com/ballen
> please tell me what is the problem in this code if i am click OK or
> Cancel same function get executed.
[quoted text clipped - 16 lines]
> regards
> Santosh Shind