• Doug Bjoin
  • NEWBIE
  • 29 Points
  • Member since 2014

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

I have 4 selectList and I would like when I click on one, the other three remain disable...
I click on another (even disable), the others are disable and it is enable...

How do I do this with JS??

I did something like this, but DONT WORK:

function enableJusteWeek(){
document.getElementById("{!$Component.theform.block01.month}").disabled;
document.getElementById("{!$Component.theform.block01.year}").disabled;
document.getElementById("{!$Component.theform.block01.week}").disabled;
}

.....

<apex:selectList size="7" value="{!days}" multiselect="true" onclick="enableJusteWeek();">

We have two Visualforce pages that were created for opportunities. Everything is working fine in a normal browser. However, only the edit button shows up in Salesforce1. All of the security is the same for both pages, and we a customized button for save and new which works fine. Meaning, Salesforce1 has access to the Opportunity New VF page. It is only the button that appears to be an issue. (Note: Both the Edit and New button for opportunities have been overridden to their respective VF page).

Anyone have any suggestions?

Thanks,

Doug
hi all,

I created a visualforce page to insert record....then If i click save button that will show success message in the same visualforce page...

this is my visualforce page

<apex:page standardController="Candidate__c" extensions="SuccessController1">
<apex:form >
<apex:pageBlock title="CandidateInformation" mode="edit">
<apex:pageBlockSection title="Information" columns="2">
<apex:inputField value="{!Candidate__c.FirstName__c}"/>
<apex:inputField value="{!Candidate__c.LastName__c}"/>
<apex:inputField value="{!Candidate__c.SSN__c}"/>
<apex:inputField value="{!Candidate__c.city__c}"/>
<apex:inputField value="{!Candidate__c.Phone__c}"/>
<apex:inputField value="{!Candidate__c.Email__c}"/>
<apex:commandButton action="{!save}" value="save"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

I created one controller to call the save method.

public with sharing class SuccessController1 {

    Candidate__c candidate = new Candidate__c();
    public SuccessController1(ApexPages.StandardController controller)
    {
 
     }
  
    public PageReference save() {

      insert candidate;
PageReference pg = new PageReference('/apex/candidate');
pg.setRedirect(true);
ApexPages.AddMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record Created Successfully.Thank you!'));
return pg;
   }
   }


But the record is not inserted. it shows insertion failed error message.. can u help me for this?
We have two Visualforce pages that were created for opportunities. Everything is working fine in a normal browser. However, only the edit button shows up in Salesforce1. All of the security is the same for both pages, and we a customized button for save and new which works fine. Meaning, Salesforce1 has access to the Opportunity New VF page. It is only the button that appears to be an issue. (Note: Both the Edit and New button for opportunities have been overridden to their respective VF page).

Anyone have any suggestions?

Thanks,

Doug
Hello,

I have 4 selectList and I would like when I click on one, the other three remain disable...
I click on another (even disable), the others are disable and it is enable...

How do I do this with JS??

I did something like this, but DONT WORK:

function enableJusteWeek(){
document.getElementById("{!$Component.theform.block01.month}").disabled;
document.getElementById("{!$Component.theform.block01.year}").disabled;
document.getElementById("{!$Component.theform.block01.week}").disabled;
}

.....

<apex:selectList size="7" value="{!days}" multiselect="true" onclick="enableJusteWeek();">