Page.SetObjectScript

Page.SetObjectScript ( 

string ObjectName,

string EventName,

string Script )

Description

Sets the script on an object's event.

Note: This action applies to objects on the current page only. To set script for an object on page 2, your application must be displaying page 2.

Parameters

ObjectName

(string) The name of the object whose script you want to set.

EventName

(string) The name of the event whose script you want to set, as it appears in the script editor dialog. For example "On Click".

Script

(string) The script to assign to the specified object's event.

Note: The script specified in this argument will replace any script existing in the event. If you want to append to the event (instead of replacing the script), you must first perform a Page.GetObjectScript action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions