-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
4Replies
Javascript to hide and reveal comments box
I wrote a simple script to display a comments box if 'Yes' is selected but it doesn't work... help?
script:
<script> function changeDisp(input, textid) { if(input == "Yes") document.getElementById(textid).style.display = "inline"; else document.getElementById(textid).style.display = "none"; } </script>
code:
<apex:PageBlockSection columns="1"> <apex:outputLabel value="Customer refused survey?" for="refused"/> <apex:InputField value="{!Post_Install_Survey__c.Refused__c}" id="refused" onChange="changeDisp(this,'{!$Component.rfcomments}');"/> <apex:outputPanel id="rfcomments"> <apex:InputField value="{!Post_Install_Survey__c.Refused_Comments__c}" style="display:none;"/> </apex:outputPanel> </apex:pageBlockSection>
-
- MBenfield
- July 17, 2009
- Like
- 0
- Continue reading or reply
Text in Page Layout
-
- MBenfield
- July 17, 2009
- Like
- 0
- Continue reading or reply
Dev 501 Training files
-
- MBenfield
- April 01, 2009
- Like
- 0
- Continue reading or reply
Field Dependencies and Default Values for Custom Object
-
- MBenfield
- March 31, 2009
- Like
- 0
- Continue reading or reply
Javascript to hide and reveal comments box
I wrote a simple script to display a comments box if 'Yes' is selected but it doesn't work... help?
script:
<script> function changeDisp(input, textid) { if(input == "Yes") document.getElementById(textid).style.display = "inline"; else document.getElementById(textid).style.display = "none"; } </script>
code:
<apex:PageBlockSection columns="1"> <apex:outputLabel value="Customer refused survey?" for="refused"/> <apex:InputField value="{!Post_Install_Survey__c.Refused__c}" id="refused" onChange="changeDisp(this,'{!$Component.rfcomments}');"/> <apex:outputPanel id="rfcomments"> <apex:InputField value="{!Post_Install_Survey__c.Refused_Comments__c}" style="display:none;"/> </apex:outputPanel> </apex:pageBlockSection>
- MBenfield
- July 17, 2009
- Like
- 0
- Continue reading or reply
Text in Page Layout
- MBenfield
- July 17, 2009
- Like
- 0
- Continue reading or reply