<script>
var ele=document.getElementById('{!$Component.product_form.product_pageblock.product_section2.Search_Keyword}');
alert('Ele = ' + ele);
</script>
<apex:form id="product_form" >
<apex:pageBlock id="product_pageblock">
<apex:pageBlockSection columns="3" id="product_section2">
<apex:pageBlockSectionItem id="sectionitem2">
<apex:outputLabel value="Search Keyword"/>
<apex:inputText value="{!SearchKeyword}" id="Search_Keyword"/>
</apex:pageBlockSectionItem>
I want to check the size of searchKeyword entered? But the alert is returning null.What might be the problem?
{!$Component}selector to the page structure. – Peter Knolle Dec 26 '12 at 12:13