Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 19 SEP 2001 08:44:24AM Yogesh Kumar wrote:

I have published a HTML page, now I want to populate the controls with the data , MY WINDOWS ARE NOT CONNECTED TO ANY DATA.

For Example I have got two controls Editline_1 and Editline_2 on my HTML page, through Internet procedure I want to pass back values to Editline_1 and 2 controls in html, Could you please provide any help on it.

Inet_formread is not useful as it is meant for forms connected with the tables. Something similar I need I can read the values from OI tables, but I don't know how to pass it back to HTML page.


At 19 SEP 2001 09:17AM Oystein Reigem wrote:

Yogesh,

Your published form looks something like this:




 Untitled 







  
 

  
 





This html document is stored somewhere. You know where.

What you want your app to send to the web user is e.g




 Untitled 







  
 

  
 





To achieve this do the following:

Go make your own stored procedure called e.g Inet_My_Proc. Check some other Inet procedure for which parameters to use. Let your procedure do the following:

- Open the file that contains your html form

- Read the content of that file

- Insert the data (in my example "Yogesh" and "Kumar" in the appropriate places

- Return the result.

Now assume your server's address is nnn.mmm.ppp. To test your procedure type in

http://nnn.mmm.ppp/cgi-bin/oicgi.exe/Inet_My_Proc

in the Address field of your browser and go!

For your user to get access to the same you must make him a web page (by hand or a dynamic one) that contains a link to this URL.

- Oystein -


At 20 SEP 2001 11:01PM Wilhelm Schmitt wrote:

Yogesh,

Within your HTML form you have to specify the ACTION which will communicate with the CGI. Within that form you also establish the parameters to be passed through the HTTP request. OICGI passes the request "HTTP://www.domain.com/inet_function?NAME1=VALUE1&NAME2=VALUE2 etc.

From within your main inet_entry you may then execute whatever calls and subroutines you like, because you are within OI.

The inet_entry creates a variable populated with HTML tags, values and scripting commands, which in turn is forwarded again to the browser. When you implement inet_entry as a commuter model with standard parameters, adding pages will become very easy.

We create our HTML templates with any text editor, store them in an AREV/OI-file. During processing we then create HTML from xlate('HTMLFILE','ID','','X') and SWAP the variable parts into HTML before returning to OICGI. We found this to be the easiest way, specially, when coming over from AREV.

Try this…

1) Create the page CGI_CALL.HTM Adapt the FORM ACTION=HTTP… to match the actual location of your OICGI.

2) From within your OI application, create and compile the function INET_CGI_CALL(). Be sure to adjust the OS location of the HTML file.

3) Activate the WEB server and the inet gateway in OI.

4) Load the HTML page into your browser and watch the changes in the debugger.

Hope this helps.

Wilhelm

******* HTML page: z:\cgi_call.htm ******






 File name
     

 Key 
     

 Field #
     

 Field value
     %%FVAL%%

 Request
     %%REQ%%

 Submit
     





******* Internet Function: Inet_cgi_call ******

function Inet_cgi_call(Request)
* ------
* Wilhelm Schmitt 19.09.01
* Testing CGI-calls
* ------
declare function Inet_Queryparam

debug

*
* Load HTML template 
*
html_file=Z:\cgi_call.htm"
OSRead html from html_file else
   html=[b]*** ERR: Template file ':html_file:' not found[/b]'
end 
*
* Parse HTTP request
*
prog=inet_queryparam(request,"PRG")
file=inet_queryparam(request,"FILE")
key=inet_queryparam(request,"KEY")
fnum=inet_queryparam(request,"FNUM")
if num(fnum) else fnum=1
fval=XLATE(file,key,fnum,'X')
if fval else fval=key:' *** not found or empty ***'
*
* Change values in HTML out of database
*
swap '%%REQ%%' with request in html
swap '%%FIL%%' with file in html
swap '%%KEY%%' with key in html
swap '%%FNUM%%' with fnum in html
swap '%%FVAL%%' with fval in html
*
* Return completed HTML form
*
return html

At 20 SEP 2001 11:05PM Wilhelm Schmitt wrote:

Sorry,

I didn't expect the HTML page to come through formatted…

Here it goes again…

* HTML page: z:\cgi_call.htm

File name

Key

Field #

Field value

   %%FVAL%%

Request

   %%REQ%%

Submit

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/be5fd7d0e026bb3485256acc0045fbec.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1