Timeline for Issue with getting element using ElementId
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 5, 2014 at 18:45 | comment | added | drakored | This isn't an ideal solution. That path is subject to change based on the visualforce rendering engine. See supporting best practice document here: salesforce.com/us/developer/docs/pages/Content/… | |
Feb 5, 2014 at 6:26 | vote | accept | S.Sharma | ||
Feb 5, 2014 at 5:57 | history | edited | BOSS_Force | CC BY-SA 3.0 |
added 535 characters in body
|
Feb 5, 2014 at 5:56 | comment | added | BOSS_Force | See my updated answer. | |
Feb 5, 2014 at 4:46 | comment | added | S.Sharma | I have tried below code , but still the alert is showing null : <apex:page standardController="Account"> <apex:form > <apex:inputField value="{!Account.name}" id="accName"/> <apex:commandButton value="Test" onclick="testFunction(); return false;"/> </apex:form> <script> function testFunction(){ alert(document.getElementById('{!$Component.accName}')); } </script> </apex:page> | |
Feb 4, 2014 at 21:42 | history | answered | BOSS_Force | CC BY-SA 3.0 |