Parse the given content for a specific "form" tag. Parsed form attributes are placed in local variables. Parsed form input fields are placed in variables that can be set via the form command.
A single HTML page can contain multiple forms, so typically each form has its "name" property set to some unique name. If that is the case, then you can control which form "parseform" parses by supplying that name:
When the form is parsed, the form attributes are put into local variables that can be accessed from the script. For instance, parsing this form:
<form name="login" action="login.asp">
Would result in the following variables:
In some cases, usually with only one form in the HTML, the form may not have it's name property set. In this case, parseform will give it the name "alertraMAIN". Note: If your HTML has more than one form without it's name property set, you cannot use parseform.
The input fields of the form are also parsed and stored in variables. A form with two input fields, 'username' and 'password' plus a hidden field called '__VIEWSTATE', would cause the following variables to be set:
The parseform command will automatically copy any form input values that have a default value to the form variable collection (see: form). You only need to set those values if you want to override the default. For instance, in the example above say 'username' and 'password' don't have default values, but '__VIEWSTATE' does. In that case, after calling parseform the form variable '__VIEWSTATE' would already be set from the value parsed from the HTML.
usage: parseform [formname]
Parses the "login" form and puts the values in FORM_login_X variables.
Alertra Script Language: Language Reference
Copyright © 2000-2013 Alertra, Inc. All rights reserved. Please read our privacy statement and our terms of service. [C]