You need to sign in to do that
Don't have an account?
anil Kumar
PageBlock color not working
Hi All,
I am trying to change pageblock color using javascript. it is not getting changed getting error colorPageBlock is not defined in the console. please advise.
<script>
function colorPageBlock(pageblock, color) {
if (pageblock != null) pageblock.firstChild.style.cssText = “background-color: ” + color + “;”;
}
</script>
<apex:pageBlockSection id = "pbc" title="SELECT INFORMATION">
<apex:inputField value="{!Opportunity.LSS1__c}"/><br/>
<apex:inputField value="{!Opportunity.LSS2__c}"/><br/>
<apex:inputField value="{!Opportunity.LSS3__c}"/>
<script>colorPageBlock(document.getElementById("{!$Component.pbc}"), "red");</script>
</apex:pageBlockSection>
Thanks,
Anil Kumar
I am trying to change pageblock color using javascript. it is not getting changed getting error colorPageBlock is not defined in the console. please advise.
<script>
function colorPageBlock(pageblock, color) {
if (pageblock != null) pageblock.firstChild.style.cssText = “background-color: ” + color + “;”;
}
</script>
<apex:pageBlockSection id = "pbc" title="SELECT INFORMATION">
<apex:inputField value="{!Opportunity.LSS1__c}"/><br/>
<apex:inputField value="{!Opportunity.LSS2__c}"/><br/>
<apex:inputField value="{!Opportunity.LSS3__c}"/>
<script>colorPageBlock(document.getElementById("{!$Component.pbc}"), "red");</script>
</apex:pageBlockSection>
Thanks,
Anil Kumar
<script>
function colorPageBlock(pageblock, color) {
if (pageblock != null) pageblock.firstChild.style.cssText = 'background-color: ' + color + ';';
}
</script>