Back

Home

HTML

RPG




Region: Canada
Region: East
Region: Europe
Region: Internatl
Region: NorthEast
Region: SouthWest


Creating collapsible/expandable HTML text with RPG and javascript

As web toolkits like CGIDEV2 and other web products are finding their way into iSeries shops, it is changing the way data is presented and distributed in these organizations.

In this example, I illustrate the use of a small javascript function that can create collapsible/expandable sections in an HTML document.  

The interesting feature, that this example illustrates, is the ability to hide HTML text within the document until the user requests it with a click of the mouse.  When clicked, the text is revealed. In this way the user does not need to access the HTTP server for each request.  It also makes it possible to present many pages of data without initially overwhelming the user with details.

The document itself is generated dynamically using RPGLE with CGIDEV2.   It may be then viewed on a web server or emailed to designated recipients.