You need to sign in to do that
Don't have an account?
Sam Cousins
How to change text color of pageMessage with Javascript?
Hi All,
I have the following javascript:
How would I change the color of this element? The above doesn't seem to work. If I do
I have the following javascript:
document.getElementById("{!$Component.f.pageBlock3.pageMessage3}").TextContent.Style.Color = "Red";
How would I change the color of this element? The above doesn't seem to work. If I do
I think your syntax is not right. Please you this.
document.getElementById('{!$Component.f.pageBlock3.pageMessage3}').style.color = 'blue';
If you want to show your error messange in the styling style and if your using eg "ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Invalid Input.')" this type of page message in your class so in place of pagemessage use Output Panel and reRender the output panel on the msg id and hide the output panel in starting.