PeopleSoft Page – JavaScript Insertion

One way to customize a PeopleSoft page is to execute javascript to manipulate the DOM. Some possible scenarios that may make this necessary:

  • add dynamic elements to your page (set some elements as draggable maybe? or perhaps adding mouseover behavior to PeopleSoft page elements)
  • removal/manipulation of elements not accessible via Application Designer (automatically added elements outside of a page definition: navigation elements, Close/Ok/Apply buttons in modal pages, etc.)

In Application Designer, insert a HTML Area on the page definition. The HTML Area can be placed anywhere on the page, however the attached javascript should not directly perform the DOM manipulations. To ensure all of the objects you want to manipulate are already loaded, attach the code on the window.onload event handler. The onload event should not be directly overridden either, lest you override any function already assigned by the PeopleSoft page processor. The proper way of javascript insertion is to append to the onload event. The best way to do this is using this technique by Simon Willison.

The HTML Area should look like the following:



8 thoughts on “PeopleSoft Page – JavaScript Insertion

  1. Ok, I gotta give you props on this.
    Google + You + Frustrated Developer != Frustrated Developer

  2. Thanks for the post. I just used this code with some other work I’m doing.

    Thanks again.

  3. Can someone please Help me on this.

    I have HTML Area below Long Edit Box. I have to count how many characters are being keyed in the Long Edit Box and display that in the HTML Area.
    When User enter 254 Characters then I have to display a message.

    What is the code I should?
    Where should I write that code?

    Your Help on this is really appreciated.

  4. Where do I need to put the code in HTML Properties OR create new HTML Definition place the code and call that definition from PeopleCode.

    Where Should I put the Functions in any of the Peoplecode event?

    From Where should I make the function calls to JAVA Script. I am totally confused. Can somebody help on this

  5. Can we run Javascript without an HTML area on the page ; it is even better if we can call the script at load process of a page with out any changes to the delivered peoplesoft pages..

  6. That would be a good idea except that when the component is interactive, thus wiping out your onload.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>