CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Add javascript

General discussion

by etwoss » 16 May 2014 09:49

Hi

I want to fire the next javascript when i click a button

tableToExcel('testTable', 'W3C Example Table')" value="Export to Excel"

How can ido that?

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

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
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General - Archive

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.