Object PmfButton
Description:
This object represents one form item of the type: Button.
Properties and methods of this object:
Properties and methods that are common to all objects of the PmfObject type:
Events:
| onAction | Is triggered when an important logical action happens over the object |
| onFocus | Is triggered if the Pmf object gets or loses focus |
Example1:
Script creates one form item. It is presumed that the oForm object already exists.
JavaScriptSelect and copy to clipboard
var oBtn = oForm.CreateItem("button", "id_btn1");
oBtn.Value = "Button";
// The function is registered into the onAction event.
function onBtnAction(ev)
{
if (ev.Action == "main")
{
Pm.Debug("PmfButton.onAction Main");
// . . .
}
}
oBtn.AddEvent("onAction", "Id_Btn1", onBtnAction);