IScripts

What are iScripts ?
IScript is PeopleCode that has access to the Request and Response objects. Just like JSP and ASP, you, the developer, writes code to read parameters from the request and write information, data, etc to the response. Unfortunately, just like ASP, the response object's write methods only render text.
How do you create an IScript?
IScripts follow the same design pattern as FUNCLIBS. An IScript is a PeopleCode function stored in a record definition. The record definition name must start with WEBLIB_. The function can be in any field event of the record definition. By convention, we generally use the field ISCRIPT1 and the event FieldFormula. The function name, however, must start with IScript_ and cannot take any parameters or return a value.
How do you call an IScript?
IScripts can be called a number of ways. How you call it depends on the purpose of the IScript. If your IScript is a pagelet, then you will create a CREF for your IScript in the portal registry under Portal Objects > Pagelets. If your IScript is called from JavaScript (Ajax, etc), then you call your IScript using a URL like http://server:port/psc/site_name/portal_name/node_name/s/WEBLIB_name.FIELDNAME.FieldFormula.IScript_name. To make it easier, you can generate an IScript URL using the PeopleCode built-in function GenerateScriptContentURL.
What is the difference between iScript Peoplecode other Peoplecode ?
iScript Peoplecode cannot refer to the component specific methods , functions and system variables. iScript executes out side the scope of the component buffer and uses respone and request objects. Non-iScript peoplecode has access to component buffer and they are invoked according to component process flow. iScript functions is invoked direclty by url which has response to browser.
see Enterprise PeopleTools 8.49 PeopleBook: PeopleCode API Reference > Internet Script Classes (iScript)).
you might be interested in looking at some examples. Chris Heller posted a couple of IScripts that can be used as
Bookmarklets.