I have copy the exact blockConfirm script in the demo, and try to use it in my custom dialog. it works fine if I put it in the button "OnClientClick" event directly.
here is my working code snippet
However, now I need to do ajax postback to do another check and alert before I show the confirm, I changed OnClientClick to call "DeleteDynamicContent" function, and I received 'event' is not defined error.
here is my new js
Please help!
Thanks
here is my working code snippet
OnClientClick="return blockConfirm('The selected Dynamic Content will be deleted. Are you sure you would like to continue?', event, 450, 100,'','DELETE DYNAMIC CONTENT');" |
However, now I need to do ajax postback to do another check and alert before I show the confirm, I changed OnClientClick to call "DeleteDynamicContent" function, and I received 'event' is not defined error.
here is my new js
function DeleteDynamicContent(dynamicContentID) { |
PageMethods.GetTotNoOfRules( |
dynamicContentID, |
Validate_OnSucceeded, Validate_OnFailed); |
return false; |
} |
function Validate_OnSucceeded(result) { |
if (result == true) { |
radalert('<%= getHelpText("Delete Dynamic Content Alert", "1a") %>', 450, 100, "DELETE DYNAMIC CONTENT"); |
return; |
} |
else { |
return blockConfirm('The selected Dynamic Content will be deleted. Are you sure you would like to continue?', event, 450, 100, '', 'DELETE DYNAMIC CONTENT'); |
} |
} |
function Validate_OnFailed(error) { |
alert(error); |
} |
Please help!
Thanks