This topic is locked

How to use Javascript API in button ClientBefore and ClientAfter event

3/1/2011 12:07:39 PM
ASPRunnerPro Tips and tricks
admin

Applies to ASPRunnerPro 6.3.
Lets say you have added a button to the regular Edit page and need to read input controls values. It would be nice if we can use Javascript API. The problem is that Javascript API requires pageid parameter which is not available in ClientBefore and ClientAfter events.
The workaround (or a hack) is to use a hardcoded value of 1 as a pageid.

var ctrlModel = Runner.getControl(1, 'Model');

alert(ctrlModel.getValue());