Hi Everyone, If you know answers or have opinions on any these questions, please respond. a. Can I use RPG CGI to create HTML that can be viewed in a browser and not connect the AS/400 http server to the internet? All of the HTML documents would be on a local network. Would configuring HTTP on the AS/400 be any different in this case? b. Can a CGI program (like ILE RPG) embed Javascript1.0 inside the HTML? c. Can I use RUNRMTCMD to launch the browser on the client with a given HTML document? We have an old RPG III order entry program where I want to build the HTML document containing the sales order number, line number and a part number bit map image. After the browser starts and the HTML document loads, the user would input part dimensions via HTML input fields. The kicker here is that an RPG program needs to initiate the whole process, which is backwards based on what I've read. The initial HTML document would pass the dimensions back to a CGI program that would write the dimensions for the sales order to a PF. The old RPG III program would simply test for the existence of that new record to see if the process went as planned. d. Can I overlay HTML input fields over an image like a .GIF? Or do I somehow need to use the image as the background? I've heard that browsers have a switch to turn the background off. Where is this setting? e. Is it possible to use window.close() to completely close the browser without the user needing to confirm the exit? If not, how can I expire the document so it cannot be used anymore? f. I created an HTML document in a source PF on the AS/400 but when I try to open the file manually in the browser through QSYS.LIB, notepad runs instead. How do I indicate that this is an HTML document, not a .MBR? I have not configured any directives or HTTP yet on the AS/400. I've read the RPG IV Sorcerer red book and E-RPG and a books on Javascript and HTML so I guess I'm considered "dangerous" at this point since I only know theory. Thanks! Chris
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
CGI, HTML basics
Collapse
X
-
CGI, HTML basics
a. Can I use RPG CGI to create HTML that can be viewed in a browser and not connect the AS/400 http server to the internet? All of the HTML documents would be on a local network. Would configuring HTTP on the AS/400 be any different in this case? The answer is YES. There is no different to configure HTTP server for Internet or Intranet. However, for Internet, TCP/IP config is a bit different . b. Can a CGI program (like ILE RPG) embed Javascript1.0 inside the HTML? Yes, it can. If seeing is believing, check out this B2B e-commerce site that using 170 and RPGLE CGI. target="_blank">www.creststeel.com c. Can I use RUNRMTCMD to launch the browser on the client with a given HTML document? We have an old RPG III order entry program where I want to build the HTML document containing the sales order number, line number and a part number bit map image. After the browser starts and the HTML document loads, the user would input part dimensions via HTML input fields. The kicker here is that an RPG program needs to initiate the whole process, which is backwards based on what I've read. The initial HTML document would pass the dimensions back to a CGI program that would write the dimensions for the sales order to a PF. The old RPG III program would simply test for the existence of that new record to see if the process went as planned. I don't see why not if you have C/A installed on the PC. d. Can I overlay HTML input fields over an image like a .GIF? Or do I somehow need to use the image as the background? I've heard that browsers have a switch to turn the background off. Where is this setting? Yes, you can and what you heard is corrected. For Netscape, click Edit - Preferences - Appearance - Color, then check Always use my colors, overring document. e. Is it possible to use window.close() to completely close the browser without the user needing to confirm the exit? If not, how can I expire the document so it cannot be used anymore? If you use window.close() JavaScript, user must click close button to close the window. To expire a HTML documuent, use META tag or output CGI header with expire data and time in GMT time. f. I created an HTML document in a source PF on the AS/400 but when I try to open the file manually in the browser through QSYS.LIB, notepad runs instead. How do I indicate that this is an HTML document, not a .MBR? I have not configured any directives or HTTP yet on the AS/400. All the source files under QSYS.LIB file system will always be .MBR file extension. For browser to open in HTML, the file extension need to be either .HTM or .HTML. You can use CPYTOSTMF to copy the member to an IFS file system then give the file with .HTM or .HTML extension. Shawn Fu
-
CGI, HTML basics
Check out this website: http://www.easy400.ibm.it/ It has a service program that handles the calls to the HTTP API's for you. They have 3-4 working CGI examples that get relatively complex. You can do things like embed Javascript in your HTML from the AS/400. The problem with the .MBR extensions can be resolved by the HTTP server configuration. Good luck.
Comment
-
CGI, HTML basics
Can I overlay HTML FORM input fields over an image like a .GIF? Or do I somehow need to use the image as the background? I've heard that browsers have a switch to turn the background off. Where is this setting? Shawn wrote: Yes, you can. Thanks for the replies. Shawn, in HTML how do I overlay INPUT fields like TYPE="text" over an "IMG SRC"? If I can do that without resorting to using the background, it would be great. Chris
Comment
Comment