Wednesday, October 21, 2009

AJAX with PeopleCode


AJAX - Asynchronous JavaScript And XML


AJAX is a group of interrelated web development techniques used on the client-side to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page.
The use of Ajax with Peoplesoft has led to an increase in interactive or dynamic interfaces on web pages and better quality of Web services due to the asynchronous mode.


Very few sites help us how to Integrate Peoplesoft and AJAX. Here is the basic code how to start…

1) Download the jquery Ajax library and put it in a publicly accessible folder on your web server
http://docs.jquery.com/Downloading_jQuery
Place the jquery.js file in Webserver
(...peoplesoft/applications/peoplesoft/PORTAL/scripts)


2) Let us test how Ajax works,with this basic example:
Add an html file to your web server root named "ajax.html" with the content:
Ajax- Working Fine &ltbr/&gt
Greetings from Peoplesoft! &lt/b&gt

3) Now, add the Ajax library to a PeopleSoft page. To do this, add an HTML area to a page. Double-click the HTML area to set the content to static with the following content:

&lt script type="text/javascript" language="javascript" src="http://server/ name:9057/PORTAL/script/jquery.js" &gt

$(document).ready(function(){ $("#ajaxcontent").load("http://server/ name:9057/DOMAIN/script/ajax.html", null, function() { $("#ajaxcontent").fadeIn("fast"); });});

&lt/script&gt&ltdiv id="ajaxcontent" style="display: none;"&gt

&lt!-- comment to keep PS from removing this empty div -->&lt/div&gt

Reload your customized page in your browser. If you see your HTML file's contents appear after the page loads, then you have Ajax working properly.

PsoftAdmirer

2 comments:

Total Pageviews

Copyright © Tech & Management Notes