instntpudn
2007-05-30 08:18:12 UTC
I add the attributes on page load as:
chkbox.Attributes.Add("onclick", "javascript:ConfirmDelete();")
The server function is:
CheckBox_CheckedChanged
it gets rendered as:
onclick="javascript:ConfirmDelete();setTimeout('__doPostBack(\'CheckBox1\',\'\')', 0)"
and finally the js is:
function ConfirmDelete()
{
if (confirm('Are you sure you want to delete this?'))
{
}
else
{
return false
}
}
it executes my js but then fails to proceed to the server side function. What the heck I am doing wrong? This shouldn't be as hard as I am making it...Thanks in advance!