Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Get values of form field in javascript from a visualforce page

Be First!
by April 11, 2012 JAVASCRIPT, Visual Force
   
       
           
               
               
           
       
   
   

(752)

Previous
Next

Leave a Reply

Get values of form field in javascript from a visualforce page

Be First!
by March 1, 2012 Uncategorized
<apex:page >
    <script language="javascript">
        function getCheckBoxValue()
        {
            alert(document.getElementById('{!$Component.myForm.pb1.pbs1.checkbox1}').checked);   
        }
    </script>
    <apex:form id="myForm">
        <apex:pageblock id="pb1">
            <apex:pageblockSection id="pbs1">
                <apex:inputCheckbox id="checkbox1" label="Check Me" onclick="javascript:getCheckBoxValue();"></apex:inputCheckbox>
            </apex:pageblockSection>
        </apex:pageblock>
    </apex:form>
</apex:page>

(7)

Previous
Next

Leave a Reply