• Julianne
  • 0 Points
  • Member since 2009

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2


In need of Javascript Advice

We need some Javascript help, so I thought I'd post this question here and on developerforce:

We are in the process of developing a public facing site that exposes some input fields from a custom object and allows the guest user to edit those fields. The business requirement is to provide a check box that says something to the effect of "check this box if you want to keep all your information the same", and if the box is checked, the UI will lock the input fields from being edited. We cannot figure out the javascript that will make this happen. We've tried “rendered”, “disabled”, and “hidden” to try and collapse/hide the outputpanel, etc, etc. Here is the code thus far (I've highlighted the section that is causing trouble using red font):

<apex:page standardController="ION_LPP_Account_Detail__c" extensions="LPPdetail" showHeader="false" sidebar="false">
<apex:includeScript value="{!$Resource.jquery}"/>
function changeFont(input, textid) {
var x=document.getElementById(textid);
if(input.checked) { x.rendered = (input.checked); x.hide = (input.checked); x.style.fontWeight = "bold"; }
else { x.disabled = (input.checked); x.style.fontWeight = "normal"; }
<apex:form >

<!-- The first outputPanel calls the function, passing in the existing occurance of the checkbox, as well as the DOM ID of the output component. -->

<apex:outputPanel layout="block">
<label for="checkbox">Click this box to collapse fields below: </label>
<input id="checkbox" type="checkbox"

<!-- The second outputPanel contains the text that will be changed. -->

<apex:outputPanel id="thePanel" layout="block">
Physician:<apex:inputField id="sp" value="{!ION_LPP_Account_Detail__c.OG_Secondary_Physician__c}"/>

If anyone has any ideas they would be greatly welcomed! Thanks!



I have form that does a post to Salesforce using WebRequest and then does a response.redirect to itself with an appended query string. I find that the record gets inserted in Salesforce only when the optional Salesforce debugging elements are enabled. However, when I comment out the debug fields, it fails to be inserted in Salesforce. 


Any help would be greatly appreciated.


Thank you!

Message Edited by shirlz on 03-14-2010 04:52 PM
  • March 14, 2010
  • Like
  • 0

for the life of me I cannot get this to work. I have a custom formua field call SIGNAL. Based on the YES or NO value in another field called Past_Due_Check_c  I want the SIGNAL field to display a RED or GREEN image. I continue to get syntax errors in the code as show below. Driving me crazy. can anyone help?


"NO", "servlet/servlet.FileDownload?file=01570000000wgFz",
"YES", "servlet/servlet.FileDownload?file=01570000000wgG4"))

  • April 03, 2009
  • Like
  • 0