<apex:inputText id="testid" style="width:40pt;text-align:center;" styleClass="testclass"></apex:inputText>
<script>document.getElementById('{!$Component.testid}').disabled = true; </script>
Thursday, 3 May 2012
Inline scripting in Vf pages
If you want to get id of any element and set certain property to it you can do that by inline scripting.
Below is the code snippet which is getting inputtext id and set the disabled property to it.
Labels:
Inline Script,
javascript,
Salesforce,
SalesforceZone,
visualforce
Location:
Auckland, New Zealand
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment