Using an AJAX Library on the IBM i


Today’s video is a response to a question from one of our viewers, Wil Rikken, from McNess BV in the Netherlands.

In my video on Sending AJAX Requests to the IBM i, I suggested the use of AJAX libraries, instead of coding everything from scratch. I also demonstrated a snippet of code that uses the ajax() function that we package with all our tools for the IBM i.

Wil wanted more details on this particular function. So, I have asked David Russo, the main developer and architect of our JavaScript AJAX library, to provide all the particulars on how to use the ajax() function with POST, asynchronous mode, etc.

I am also making the AJAX Library and the corresponding documentation available as a free download in our Resources Section on the site. You can access it here.

To view this video with Windows Media Player, please click here

, , , , , , , , , ,

  1. #1 by michael calderon on December 17, 2009 - 2:49 pm

    Can you please give an example from nuts to bolts using your item data base.

    You seem to have all teh components on the .tv site but they do not show one example beginning to end.

    i would like to see the :
    1) RPGSP web page with the form (.pgm)
    2) the Javascript (.JS)
    3) the RPGSP that process the request (.pgm)
    4) all the necessary code to make it work.

    thanks.

    Michael C

  2. #2 by Alex Roytman on December 31, 2009 - 3:33 pm

    Hello Michael,

    Thanks for your request. We have created a complete, working example of a simple AJAX project that you can download to your workstation. You can access this file at:

    http://www.profoundlogic.tv/pltv_resources/PLTV_AJAX_Sample.zip

    Once you have downloaded the file, you simple need to extract the two source code files inside, and open them with RPGsp (If you do not have a copy of RPGsp, you can download a free trial by clicking here). After opening the files in RPGsp, compile them both using the Build/Run pulldown menu (Build/Run –> Compile) and launch the Ajax.rpgsp file (Build/Run –> Launch in Browser). From here you can check the source code for comments on the functionality and syntax.

    Hope that helps,
    Alex Roytman

Comments are closed.