Local CGI
With online web sites, you can write Web applications which process form input and produce resulting pages which are then sent back to the browser. This is usually done using "Common Gateway Interface" (CGI) calls. Local CGI gives the Ebook the same capability, except that the crafting of Local CGI applications is usually much easier than the online variety!
Just as with regular CGI, a Local CGI call is defined using the <FORM> tag's Method and Action attributes, e.g.
<form Action="notepad.exe" Method="output.htm">
The above statement tells the Ebook that when the submit button on the form is pressed, it should:
You can also use the HREF tag for a Local CGI call:
<A HREF="myprog.exe CGI=output.htm ITEM1=ALFA ITEM2=BETA">Submit CGI</A>
This will generate a file with the following two lines:
ITEM1=ALFA
ITEM2=BETA
EXE files referenced in Action statements (and also in direct HREF links) are assumed to be:
Form data is located in the Windows temporary directory and automatically erased once the CGI call is finished.
If the program that handles the CGI calls was compiled into the Ebook, it also will be temporarily saved to the temporal directory as the CGI Call is done.
Once you know how to call your Local CGI program, you need only write the code to process the form data file. Then have the program generate an HTML response page and open it in the Ebook.
The form data file full path and name will be provided to the Local CGI program as a command line parameter.
After that Local CGI programs loads and processes the form data file, it should generate and save its response overwriting the form data file.
After that, the Ebook will detect that the form data file changed, and will load and show the result generated by your Local CGI program inside the Ebook screen.
Note: The program for processing the Local CGI call should be made for that specific purpose. We cannot make it, but we provided an example to guide the programmers at: