onPageAction - event of object PmWebDir

The event fires after sending parameters from the HTML document into the PROMOTIC application, for example after the HTML Form is filled in.
pMe(Object) Reference to the PROMOTIC object where the event rises.
pEvent(Object) A referrence to object describing detailed information about the specific event.
pEvent.FilePath - (String) Relative path to the file that is requested from the Web browser.
pEvent.Method - (String) Name of the HTTP method by which the parameters were sent:
"POST" - Sending parameters from the HTML form
"GET" - Sending parameters as a part of the required new page
pEvent.Params - (String) Text string that contains values of individual elements from the HTML form. This string has the form, for example "a=13&b=xyz". It means that "a" has the value "13" and "b" has the value "xyz".

By the Pm.HTTPGetFormValue method it is possible to separate individual values from this string (see example).


The event fires after the PmWeb.onNewRequest event and before creating the answer to the client (before loading and modifying the file pEvent.FilePath and before the PmWebDir.onPageModify event).

The event fires only if the client that sends the data, has the WebWrite permission.

Example of sending parameters from the HTML form ("POST" method). The HTML form has, for example, the following content:
  <title>HtmlForm example</title>
  <form action="main.htm" method="POST">
    <input type="text" name="V1" value="22"/>
    <input type="submit" value="Send to the server"/>
If the client enters the value, for example, 33 and it sends the form, then the onPageAction event fires on the server with the set values:
VBScriptSelect and copy to clipboard

pEvent.FilePath = "main.htm"
pEvent.Method = "POST"
pEvent.Params = "V1=33"
In the event, for example, this algorithm can be used:
VBScriptSelect and copy to clipboard

Dim sV1
If pEvent.FilePath = "main.htm" Then
  sV1 = Pm.HTTPGetFormValue("V1", pEvent.Params)
  'value "33" is in the sV1 variable ...
End If
Example of sending parameters as a part of the required new page from another HTML page ("GET" method). In any HTML page there can be, for example, the reference:
<A href="main.htm?V1=55">Set V1=55</A>
Example of sending parameters as a part of the required new page directly from the address line of the internet browser ("GET" method). In the internet browser enter, for example:
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice