jump to navigation

A Custom Message on the Signon Page (part 3) November 9, 2007

Posted by Duncan in Oracle, PeopleSoft, PIA.
trackback

A further solution to the ‘Message of the Day’ problem has presented itself which may or may not (depending upon the client’s requirements) be a neater solution.

This is quicker and cleaner to implement, but only works with IE. If your client uses Firefox this isn’t the answer for you!

Message of the Day

So how do you do it?

1) Create the MOTD.html file in the same location as before, but this time leave out any tags and style info, just have the text.

2) Edit the signin.html page.

Place the following in the scripts section:

function include(url)
{
var xml = new ActiveXObject("Microsoft.XMLHTTP");
xml.Open( "GET", url, false );
xml.Send()
document.writeln(xml.responseText);
}

And add the following in the same place as before.


<td><div align="center">
   <p class="psloginerror">
      <SCRIPT language='JavaScript'>
         include("http://<web_server>/MOTD.html");
      </SCRIPT>
   </p>

   <p class="pslogintext"> <%=traceLink%> </p>
   <p class="psloginerror"> <%=error%> </p>
   <p class="psloginerror"> <%=ps.discovery.error%> </p>
</div></td>

This solution was gleaned from a discussion on Customer Connection and in particular from a gent named Jeremy Radwan.

Advertisements

Comments

1. PeopleSoft Tipster - November 9, 2007

Comment from Joe Ngo from the Chillijoe website:

Actually, there’s no need to confine your technique to IE users. What you have demonstrated is simply the basic IE-specific form of what is now well-known as ajax. Almost all modern browsers already support XMLHttpRequest (the feature that drove the growth of ajax).

The include() function from your post could be easily modified to be cross-browser. See this article for a primer:
http://www.jibbering.com/2002/4/httprequest.html

2. Jeremy C. Radwan - January 4, 2008

Hi! I stumbled across your blog posting while doing some Googling of myself. 🙂

I wanted to let you know that I have since modified my signin page code to work on both IE and Firefox. The new function looks like this:

function include(url)
{
   var xml = (typeof window.ActiveXObject != 'undefined')
              ? new ActiveXObject("Microsoft.XMLHTTP")
              : new XMLHttpRequest();

   if (xml !=null) {
      xml.open( "GET", url, false );
      xml.send(null);
      document.writeln(xml.responseText); 
   }
} 

Then do the include as normal in the location where you want the message:

include("http://mysite/psoft/my_system_msg.html");

I also designed a quick page in PeopleTools so I could update the system message from within PeopleSoft instead of editing the .html file on the web server directly (this also allowed me to grant permissions on the component to let other specific users change the message).

3. Jeremy C. Radwan - January 4, 2008

Ooops, I see you already came up with a cross-browser solution in Part 4.

4. PeopleSoft Tipster - January 4, 2008

Good stuff, thanks for popping by Jeremy. Your code looks like a better version than the one I finished with, so that’s a valuable contribution. I like the idea of an update page within PeopleSoft too.

Wade Burns - July 7, 2009

I’ve been spending some time working with this code in a test environment and have a somewhat working version. I’m curious if anyone knows how I can simply change the message file and have it picked up and displayed without having to bounce the web server? I assume it is something with how the web server is handling the cache?

5. Tipster - July 18, 2009

It is supposed to allow you to update the message and the changes to appear without rebooting or cache clearing.

It might be worth installing Firebug to see what the Web Server is sending …

Wade Burns - July 20, 2009

Thanks for the response…should’ve let you all know that I figured out that it is the caching on the server setup that was the issue. Once I got that figured out, the message worked as advertised.

Chip - December 30, 2009

How/where did you change the cache settings to get the message of the day to work? I’m having the same prob (we’re using weblogic 9.2)

6. Tipster - January 4, 2010

I’m not sure how Wade solved it, but I’ve had a quick look this morning and in the version I’m using (Weblogic 10) it seems as though a little extra work is required to deal with caching. Graham Smith spotted it and has replied to part 4 of this blog post here:
https://peoplesofttipster.com/2007/11/14/a-custom-message-on-the-signon-page-part-4/#more-54

After applying this extra change it now works in more recent versions of Weblogic.


Sorry comments are closed for this entry

%d bloggers like this: