TOC : Script API > JavaScript > JavaScript API > GeneralScript > Page > Method >

 

GetComponentByName

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > GeneralScript > Page > Method >

 

GetComponentByName

 

 

Gets the components of the name.

 

 

 

Prototype :

 

object GetComponentByName

(

       string ComponentName

)

 

 

 

Arguments :

 

ComponentName

component name

 

 

 

Reference :

 

Get a component in the same page.

 

If a page have multiple components with the same name, the first component will be returned.

 

 

 

Example :

 

var objPage = This.GetPage();

var objComp = objPage.GetComponentByName("Label2");

objComp.SetText("FORCS");

 

 

 

Available Events :

 

OnAddToPage,  OnCheckValidity,  OnClick,  OnEndBind,  OnFocus,  OnKillFocus,  OnValueChanged