<
asp:Button ID="btnSave" runat="server" Text="Save" OnClientClick="return validate();" onclick="btnSave_Click" />
the javascript function is written in external .js file.
In one scenario, if the javscript validations pass, I want the server side click event to execute and open radwindow on server side using the below code. But the server side event is not executing. if I take out onClientClick event then only server side event is firing. Also the radalert doesnt pop out.
string
openWindow = "<script language='javascript'>function f(){var navUrl = 'http://www.telerik.com';var oWindow = radopen(navUrl);oWindow.set_width(300);oWindow.set_height(300);oWindow.center();Sys.Application.remove_load(f);};Sys.Application.add_load(f);</script>";
Page.ClientScript.RegisterStartupScript(
this.GetType(), "radalert", openWindow);
here is the validate function in javascript file:
function validate()
if
(!rdChecked) {
radalert('Validation failed
', 300, 100, '');
return false;
}
else {
return true;
}
any ideas?