|
Sybernet / Supplied Procedures Reference
Release 3.00 Oct 14, 2002 |
|
This procedure allows you to create the beginning and ending FORM tag. The ending form tag </FORM> is created when all of the parameters to this procedure are null. The beginning form tag is created when any of the parameters are non-null.
Procedure SP_HTML_FORM
(
NAME VARCHAR2
, METHOD VARCHAR2
, ACTION VARCHAR2
, TARGET VARCHAR2
, ENCTYPE VARCHAR2
, ONSUBMIT VARCHAR2
, PROCNAME VARCHAR2
, FORMAT VARCHAR2
, CONTENTTYPE VARCHAR2
, FILTER VARCHAR2
, JAVASCRIPT VARCHAR2
, DEBUG VARCHAR2
) ;
| Parameter | Description |
|---|---|
name |
NAME specifies the name of the form object. NAME is optional, but if
specified, it is used to reference a form and its form elements in JavaScript.
NAME is needed when calling sp_html_button and you are creating an "image button" so that procedure can determine which form is being submitted when a user clicks an image. |
method |
METHOD may be POST or GET. The default is POST if not specified. |
action |
ACTION is the name of the Sybernet CGI. This parameter is ignored since there is only one Sybernet CGI. |
target |
TARGET optionally specifies the windowName to be used for output when this form is submitted. If not specified, output returns to the same window as the form. |
enctype |
ENCTYPE determines the type of form data being submitted. The default is "application/x-www-form-urlencoded." Sybernet also allows you to specify "multipart/form-data." This ENCTYPE is required when submitting a file with TYPE="FILE". |
onsubmit |
onSubmit handles the onSubmit event handler. In this case you must supply the complete JavaScript syntax yourself, and that is its purpose |
procname |
PROCNAME corresponds to the Sybernet reserved word PROCEDURE. sp_html_form calls sp_html_input to create a hidden field when this value is not NULL. If omitted, you will need to call sp_html_input yourself to specify this value. |
format |
FORMAT corresponds to the Sybernet reserved word FORMAT. sp_html_form calls sp_html_input to create a hidden field when this value is not NULL. |
contenttype |
The Content-type. |
filter |
FILTER corresponds to the Sybernet reserved word FILTER. sp_html_form calls sp_html_input to create a hidden field when this value is not NULL. |
javascript |
This parameter determines whether or not to invoke the JavaScript functions
that are used to validate your input fields. If you use the Sybernet SDK
to create more than one form on your HTML page, JAVASCRIPT should be
explicitly assigned to FALSE on all but the first call. The default is TRUE. Surprisingly, it doesn't hurt to invoke the JAVASCRIPT stored procedure multiple times because JavaScript reassigns the function names on each invocation; however, the extra invocations are wasteful at best. |
debug |
For Internal Use Only. |
The first example creates the beginning Form tag. The form NAME is specified because I am going to reference this form later when I create an image button that submits this form when it is clicked:
http.sp_html_form
(
NAME => 'myForm'
, METHOD => 'post'
, ACTION => 'Sybernet.cgi'
, PROCNAME => 'sp_html_template'
, FORMAT => 'SUPPRESSED'
) ;
Since METHOD is optional and ACTION is ignored, the minimum needed to create the beginning form tag (assuming the form is not named) would be accomplished with the following:
http.sp_html_form(PROCNAME => 'sp_html_template');
The next example simply creates the ending Form tag. The ending tag is created because no parameters were passed to this procedure:
http.sp_html_form;
If you use the SDK to create more than one input form, then you will want to inhibit the inclusion of the JavaScript functions that validate your form fields.
http.sp_html_form
(
, METHOD => 'POST'
, JAVASCRIPT => 'FALSE'
) ;
Failure to do so will include these functions for each invocation; however, although this does not create a problem for JavaScript, it does increase the size of your HTML screen.