Salesforce: get Apex Component DOM Id

 

This article https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_component.htm describes how to Salesforce: get Apex Component DOM Id, namely you can do that in this way

<pre><apex:page>
    <apex:pageBlock id="theBlock">
        <apex:pageBlockSection id="theSection" columns="1">
            <apex:pageBlockSectionItem id="theSectionItem">
                <apex:outputText id="theText">
                    Heya!
                </apex:outputText>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

</pre>
<pre>document.getElementById(
"{!$Component.theBlock.theSection.theSectionItem.theText}")

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s