Kbase 16733: Webspeed 1.0 - Using WEB-CONTEXT:FORM-INPUT
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
SUMMARY:
WEB-CONTEXT is a built-in system handle that contains attributes pertaining to the current connection to the web server. The attribute FORM-INPUT is an "&" delimited list of name=value pairs. If the CGI method is a POST, FORM-INPUT contains the field names and their user-supplied values in the HTML form. If the current request-method is a GET, then FORM-INPUT will equal "?", and you will need to look at the QUERY-STRING variable for the field=value pairs that may have been embedded in the URL.
EXPLANATION:
WEB-CONTEXT:FORM-INPUT was an undocumented WebSpeed version 1 feature. There should be no need for user application code to reference this directly. Code should instead be calling the GetField() procedure to get at fields on an individual basis.
The version 1 WorkBench is 16-bit and did not get the extensions for the WEB-CONTEXT handle. Therefore, code that uses these extensions on the WorkBench cannot be compiled.
However, the following code can be implemented in order to
Check Syntax on WorkBench.
/* Define preprocessors that allow this file to compile
under WorkBench. */
&IF "{&OPSYS}" = "MSDOS" &THEN
DEFINE VAR wsdummy AS CHAR NO-UNDO.
&Scoped-define WEB-FORM-INPUT wsdummy
&ELSE
&Scoped-define WEB-FORM-INPUT WEB-CONTEXT:FORM-INPUT
&ENDIF
In your code you can use the preprocessor:
IF LENGTH({&WEB-FORM-INPUT}) > 1024 THEN RETURN.