Changing ToolTip text in a PeopleSoft page using HTML and Java Script

In PeopleSoft we often reuse a same field in several pages with different labels. These labels can be either controlled by peoplecode or by changing the label either at the record field level or at the page level.

In such cases, the tool tip text which gets displayed during mouse hover will not be the same as the label set for that page/record. The tool tip text displayed on mouse hover would be the Default label defined for that field.

When a same field is used for Submit/Reopen or other actions, the default tooltip text may render useless or misguiding text. To resolve this we can make use of JavaScripts and HTML. How?

    1. Insert a HTML area in the page where the label of a field needs to be changed dynamically.
    2. In the HTML tab of the HTML Area Properties select Constant
    3. Paste the below code after making the required changes and click ok.
    4. Code to be pasted: Replace '[' and ']' symbols with '<' and '>' symbols respectively. (I've replaced '<' and '>' symbols of html tags with '[' and ']' to avoid the crazy behavior of blogger which resolves html tags when using '<' and '>' symbols)
                    [script type="text/javascript"]
                    [!--comments - Normally the record.fieldname notation will have a slight change of '_' replacing the '.' sign .];
                    var variable1 = document.getElementById(Recordname_Fieldname);
                    [! --comments Static tooltip text assignment --];
                    variable1.setattribute('title','Required tooltip text');

In case if the tooltip text has to be change dynamically(based on the value of a field) then, the below snippet should be used.
                     if (variable1.value == 'value1'
                     variable1.setattribute('title','tooltip text 1')
                    variable1.setattribute('title','tooltip text 2')

Courtesy: VJ


  1. Hi,

    I had tried the above code but its not working,god knows why...i WILL TELL U THE SCENARIO wht i did..
    i have 2 push button on a page namely save,save with same field ok_pb(dELIVERED).nOW AT BOTH PUSH BUTTON I AM GETTING A TOOLTIP AS OK rather than save.

    i had a html area in which i inserted ur dynamic code.i hade change the [] with<> also put recordname.fieldname...still not working
    any suggetions

  2. Hi,

    Great information on Javaacripts to alter Peoplesoft. I tried to alter the tool tip text on a PS page, but it did not work. Question - do I need to clear cache on the web server? I am on PT 8.47. Do I need to be on 8.5 to use this script?

    My email address: mdworzyc@reveregroup.com


Please refrain for marketing messages and unnecessary back links.

Workflow errors on New Hire and Add employment instance

User tries to hire a new person or tries to add a new organization relationship encounters a series of error messages related to workflow...

Trending in this Blog this month