SBM JavaScript Library Guide → Reference → Event Methods → GetFormActionsEventSource
Returns the source element for an event that is currently being handled and that was defined in a form action.
None
Result | Value |
---|---|
Source element | The element that was the source of the current event. |
This example turns the Title field red when it gains focus, and removes the color when it loses focus. (One of the events defined in the form action is "When Title field gains focus, then execute "Colorize();".)
function Colorize() { var src = GetFormActionsEventSource(); if (!src) return; src.style.backgroundColor = "#FF0000"; } function Uncolorize() { var src = GetFormActionsEventSource(); if (!src) return; src.style.backgroundColor = "#FFFFFF"; }
The source element that is returned is only valid during the current event, so this method should be used within the context of a callback method.
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.