w3HtmlFormBeg

Syntax    Parameters   Example Programs   Example

Use w3HTMLFormBeg to create an input form. This function creates the form and inserts all necessary hidden variables needed for FlashCONNECT.

You can create input forms without using this call by using the w3Action call to retrieve the URL which submitted the page, and then using w3SessionId, w3InputPromptNumber, w3Exec, and w3ServerPool as needed. However, the method is more complex and is not recommended.

Syntax

call w3HtmlFormBeg (flags, options)

Parameters

flags

In

Flags that control the form. The following flags are defined:

  • w3HtmlFormGet
    Changes the form's method to GET. Otherwise the method is POST.

  • w3HtmlFormSSL
    Changes the form's URL type to "https" from "http".

  • w3_NP
    By default a persistent connection is set up. This flag is used to setup a non-persistent form.
    If this flag is used, the first attribute of the Options parameter is used as the name of the FlashCONNECT application run when the form is submitted.  If the name is not specified, (Attribute 1 = "") the current value of w3Exec is used as the application name. The remainder of the Options attribute is used as described below.

If more than one flag is specified, the flags are joined with a ":" character.

Options

in

Specify additional information for insertion before the closing > bracket of the FORM tag. This can be used to insert JavaScript or VB Script into the form HTML tag. If the w3_NP flag is set, the first attribute is removed before adding to the FORM tag. If the w3_NP flag is not set, the first attribute is not removed before adding the options to the FORM.

Example Programs

w3Admin.w3Config.form

receivedata

event

MTSelectPayment

act*23235

act*22091

MTDecline

act*22411

MTAccept

w3Admin.w3Apps.create

programming.bas6

 MTPayment

w3Admin.w3Apps.Maintain

Myapp

programming.bas7

 w3Admin.w3Groups.form

 w3Admin.w3LogsControl.form

 w3Admin.w3Apps.Update

FrameTest

programming.bas9a

Ihello

selectTest

 w3Admin.w3User.form

 nptest

 Xlate1

programming.bas8a  

Example

call w3HtmlFormBeg(w3HtmlFormSSL:w3HtmlFormGet,"")

     generates the following HTML:

     <form Method="GET" action="https:[URL]" Name=MYFORM>

     <input type=hidden name=w3SessionId value='[w3SessionId]'>

     <input type=hidden name=w3InputPromptNumber value='[w3InputPromptNumber]'>

call w3HtmlFormBeg(w3HtmlFormGet, "Name=MYFORM")

     generates the following HTML:

     <form Method="GET" action="http:[URL]" Name=MYFORM>

     <input type=hidden name=w3SessionId value='[w3SessionId]'>

     <input type=hidden name=w3InputPromptNumber value='[w3InputPromptNumber]'>

call w3HtmlFormBeg("","")

     generates the following HTML:

     <form Method="POST" action="http:[URL]">

     <input type=hidden name=w3SessionId value='[w3SessionId]'>

     <input type=hidden name=w3InputPromptNumber value='[w3InputPromptNumber]'>

call w3HtmlFormBeg(w3_NP,"myapp":@AM:"Name=MYFORM")

     generates the following HTML:

     <form Method="POST" action="http:[URL]" Name=MYFORM>

     <input type=hidden name=w3ServerPool value='[pool]'>

     <input type=hidden name=w3exec value='myapp'>

call w3htmlFormBeg(w3HtmlFormSSL:w3_NP:w3HtmlFormGet, "myapp":@am:"Name=MyForm")

     generates the following HTML:

     <form Method="POST" action="https:[URL]" Name=MYFORM>

     <input type=hidden name=w3ServerPool value='[pool]'>

     <input type=hidden name=w3exec value='myapp'>

call w3htmlFormBeg(w3HtmlFormSSL:w3_NP:w3HtmlFormGet, "myapp")

     generates the following HTML:

     <form Method="GET" action="https:[URL]">

     <input type=hidden name=w3ServerPool value='[pool]'>

     <input type=hidden name=w3exec value='myapp'>