• MBenfield
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies

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>

 

           

 

Is there any way to simply add some descriptive text to a layout?  I'm creating a page layout for a custom object and I'd like some instructions on the page for my users...