I use default Advanced/Insert Template. I would like to do validation for overlap appointments before the postback on the client side.So i try to re-use the code for the LinkButton RadConfirm example.
On the FormCreated event I added OnClientClick event for InsertButton
and in my Javascript I added
BUT my javascript function never been call and it is really inconvenient to use RadConfirm on the server side after postback : all data from the insert form have been disappeared.
Please, advice how I can make the code to work. Thank you for your help!
On the FormCreated event I added OnClientClick event for InsertButton
if (e.Container.Mode == SchedulerFormMode.AdvancedInsert) { LinkButton formButton = e.Container.FindControl("InsertButton") as LinkButton; if (formButton != null) { formButton.OnClientClick = "confirmLinkButton(this); return false;"; }}function confirmLinkButton(button) { try { alert("confirmLinkButton"); function linkButtonCallbackFn(arg) { if (arg) { eval(button.href); } }// RadConfirm(insertOverlapMessage, linkButtonCallbackFn, 330, 180, null, "Confirm"); var confirmReturn = confirm(insertOverlapMessage); if (confirmReturn) { eval(button.href); } } catch (e) { alert(" confirmLinkButton: Error Description: " + e.Description + " Error message:" + e.message);}}BUT my javascript function never been call and it is really inconvenient to use RadConfirm on the server side after postback : all data from the insert form have been disappeared.
Please, advice how I can make the code to work. Thank you for your help!
