Promotic

HTTPGetFormValue - method of the Pm object

Description:

Decoding the text string delivered from the Web browser (e.g. after filling the form). The string has the standard form of:
"Name1=Value1&Name2=Value2 ..."
Syntax:
String HTTPGetFormValue(Variant vKey, String sData)
Parameters:
vKey(Variant) name or index of the HTTP message parameter (e.g. the value of the "description" edit box in the HTML form) whose value has to be obtained
sData(String) body of the HTTP message
Note:
The HTML form can send data by the POST method to the server in a simple text form application/x-www-form-urlencoded, e.g. "Name1=Value1&Name2=Value2 ...", where the individual values can then be read by Pm.HTTPGetFormValue.
 
The HTML form can also send the data by the POST method to the server in a complex binary form multipart/form-data, that may contain text values together with binary data and files. The raw data in the form of the PmBuffer object can then be processed by the Pm.HttpFormDataParse method.
 
The method returns a text value of the item determined by the vKey parameter. If the specified item is not in the sData, then the method returns an empty string.
The vKey value specifies the tag of the HTML form. For example for the tag:
<input type="text" name="T1" value="2.0"/>
There is vKey="T1".
The method should facilitate the work with HTML forms because it removes manual decoding of the received string.

This method is not functional in Web panels.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var sData = "Boiler1=123&Boiler2=256";   // let's have a text value in the sData variable then:
var s = Pm.HTTPGetFormValue("Boiler1", sData);   // s contains "123"
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- HTTPGetFormValue
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.