function_name(arguments); //eg. tpzDrillTable('','Login','0','listdetail');
where "function_name" is the Java script statement to be executed on clicking "Submit" button. You can find this statement in the "onclick" attribute of the "Submit" button
The code for this form is given below.
Please note that the code contains only some illustrative functions which would be required to explain Formfill and do not reflect the exact code of the HP Service Manager Login form.
1.2 Understanding Form Submit
In Linux Access Gateway, you can configure a form fill policy to submit the form in the following ways:
- Manual Submit: When a form is configured for manual submitting, all the fields configured in the form fill policy are automatically filled by Linux Access Gateway for the user. The user must then manually click the Submit button in the form to submit it to the Web server protected by Linux Access Gateway.
- Autosubmit: In Autosubmit, the actual form is processed such that all additional scripts not needed while submitting the form data to the webserver are removed. A temporary form is created on runtime with necessary form data in hidden format and an additional function LAGSubmitForm() as,
where form is the single form present in the HTML page and submit" is the default action associated with the Form’s submit button to submit this form to webserver automatically. This approach will work for forms with default action of the "Submit" button as POSTing the form data.
- Autosubmit with Masking: When Autosubmit with masking is enabled for a form, the form data is submitted automatically to the Web server. But the data sent to the Web browser over the network is masked for additional security.
For example, these touch files help proper Formfill of complex login forms by CRM applications or TWC applications. When the touch files are present form fill does not perform HTML parsing, just as the case is with manual submitting though Autosubmit option is enabled. All the fields in the original HTML form are populated with the values configured in the form fill policy and the form data is sent to the Web browser.
However, one of the limitation with this approach is that functions configured in the Functions to keep section fail to get executed as Linux Access Gateway does not process HTML to include the function LAGSubmitForm()to perform autosubmit. To workaround the issue, the statement document.forms.submit(); must be added to the Statements to execute section. This statement ensures that the form is submitted properly with the assumption that the default action of the Submit button is POST for the form.
1.3 Why Does FormFill Fail with Regular Policy?
The following section explains the process that takes place when a client requests for a form which is configured with a regular form fill policy.
The following is the POST request sent to the browser
However, the browser expects to receive the following POST request and does not auto submit the form:
Note the difference in POST requests sent to the browser. In the first case, the POST request has &0=Login&3=Cancel appended, which causes the login to fail.
For Formfill to work for the sample login form one must do the following modifications:
- Modify the regular Formfill policy to include the statement to be executed when "Submit" button is clicked as described in 1.4 Creating Form Fill Policy
1.4 Creating Form Fill Policy
The following procedure describes the steps to configure the form fill policy with Java or VBScript functions.
- In the Administration Console, click Policies > Policies.
- Select the policy container, then click New.
- Specify a display name for the policy and select Access Gateway: Form Fill for its type.
- (Optional) Specify a description for the Form Fill policy.
- In the Actions section, click New, then select Form Fill.
- In the Form Selection section, select Form Name and specify topaz in the text box.
- In the Fill Options section, specify all the input fields and select options.
Please note that all the Input Field Value are illustrative and have to be substituted with the actual values from the original form.
- In the Submit Options section, select Auto submit.
function verify(f, bSubmitToSelf)
- Click OK.
- Select Statements to Execute and specify the form action that needs to be performed when the form is submitted. For the sample form, specify the following statement:
- Click OK.
- On the Policies page, click Apply Changes.
1.5 Creating Touch Files
- Log in as root to Linux Access Gateway shell.
- Specify the following command to create the.enableInPlaceSilentFill file:
When this touch file is used, the Linux Access Gateway does not generate a new page if autosubmit is enabled, but fills the page received from the Web server and hides the text/password/unspecified type fields. Form-Fill issues for CRM applications and teaming and conferencing applications are resolved with this touch file.
However, when this touch file is used, the Debug Submit and JS Functions to Keep options of the Form Fill policy do not work.
- Specify the following command to create the enableInPlaceSilentFillNew file:
- Specify the following command to restart Linux Access Gateway:
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.