by Jorge Sousa » 16 May 2014 10:14
Hi
If that's the only thing you want to be done when you click the button, you can use JQButtonOptions.OnClick.Script (use the IDE inspector, it's easier).
if you need to add the javascript in a server event,
If it's an ajax event you can use WebApplication.CallbackResponse.AddJavascriptToAjaxResponse or CGAddJavaScriptToAjaxResponse(
If it's a full submit event you can use PageContext.AddToInitProc or PageContext.AddToInitProcLastCode