A3DPDFPageFieldSetActionJavascript

A3DStatus A3DPDFPageFieldSetActionJavascript(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char *pcJavascriptString)
A3DStatus A3DPDFPageFieldSetActionJavascript(A3DPDFPage* pPage, const A3DUTF8Char* pcFieldName, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char* pcJavascriptString)

Function to attach JavaScript to a form field.

The JavaScript is defined as a string.

The goal of this function is to define a JavaScript action to be launched on an event. The action event is different depending on the type of the field. For fields of type:

  • dropdown list: the action is the selection of a list item.
  • listbox list: the action is the selection of a list item.
  • button: the action is the button pushed.

Return Values

A3D_SUCCESS:

9.0

Parameters

pPage: The Page object to work with.

pcFieldName: The name of the form field. Only Acroform fields are supported.

eEventActionType: The action type. Only kA3DPDFEventPageOpened and kA3DPDFEventPageClosed are relevant at page level.

pcJavascriptString: The string which contains the JavaScript.

Returns

A3D_SUCCESS in case of success or an error code