Return to the iSWeb Tips
Simple AJAX and iSeries Form Sample
This example found in the Easy400Group group at yahoo groups and was submitted by hr (at) common (dot) dk .
Program AJAX4P -------------- H DatFmt(*eur) /copy qrpglesrc,hspecs /copy qrpglesrc,hspecsbnd /copy qrpglesrc,prototypeb /copy qrpglesrc,usec /copy qrpglesrc,variables3 d web_page s 128 d name s 50 d address s 50 /copy qrpglesrc,prolog3 c eval web_page = %trim('/w600websam/') c + 'ajax4.htm' c callp gethtmlIFS(web_page:'') c eval name = zhbgetvar('name') c callp UpdHtmlVar('NAME':name) c eval address = zhbgetvar('address') c callp UpdHtmlVar('ADDRESS':address) c callp wrtsection('noname') c callp wrtsection('*fini') c return HTML AJAX4: ------------ Content-type: text/html This is the response from iSeries:
Your name are /%name%/
Your Address are /%address%/
[report a broken link by clicking here]