• 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...
I attended DEV 501 back in September and I decided to review some of the exercises.  Of course i realized that I need the training files in order to do any of the exercises inthe workbook.  Anyone know where I might find a zip file of the lab files?
I went through a bit of work to set up a lot of field dependencies and default values for a custom object which is a customer survey.  In the default layout everything is fine but the look and feel is horrid so I am attempting to create my first visualforce pages.  The field dependencies and default values don't seem to work in vf.  So I need to be able to set these things by hand I am guessing by using a controller extension?  Could someone give me a simple example of a yes or no picklist that causes the values to change in a second picklist and also a simple example of a picklist with a default value automatically selected.  Mine always have --None-- selected even though there are default values defined in the custom object...Thanks!

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...