HTTPGetFormValue - method of the Pm object


Decoding the string delivered from the Web browser (e.g. after filling the form). The string has the standard form of:
"Name1=Value1&Name2=Value2 ..."
String HTTPGetFormValue(Variant vKey, String sData)
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
The HTML form can send data by the POST method to 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 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 PmBuffer 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 value vKey specifies the HTML tag of the form. For example for the HTML 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.
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.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- HTTPGetFormValue
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice