Calling HTML references

You can call HTML references by using either a link with fixed parameters or variable parameters passed through an HTML form. WinCC OA HTML references are always called via the query page "/WinCC OA?ref=[HTML-Ref.]"

, for example,

http://localhost/WinCC OA?ref=refs/examples/link.htmlRef

"ref"

The fixed parameter "ref" specifies the file name of the HTML reference with or without the extension "ref". (For example, ref=diagnostics/diagnostics.html).

All other parameters to be passed are separated by "&" and must have the syntax "[Parameter1]=[Value1]".. Replace spaces with "+" signs.

Example

Call the base reference "baseSample.htmlRef" with the $parameters $dpe1 and $dpe2 from a fixed link.

The query for this reference is launched with WinCC OA?. The corresponding link (that must be saved in a file) is as follows:

<a href="/WinCC OA?ref=refs/examples/baseSample.htmlRef

&dpe1=ExampleDP_Arg1.&dpe2=ExampleDP_Arg2." target="result">

Fixed link to base reference</a>

//the link calls the baseSample.htmlRef file

Call the link as follows (in the example the name of the file is link.htmlRef):

http://localhost/WinCC OA?ref=refs/examples/link.htmlRef

For testing purposes you can also enter this link directly in your browser window, specifying the HTTP Server (for example, 193.81.17.85 or eiwnt160/WinCC OA?ref=refs/examples/baseSample.htmlRef&dpe1=ExampleDP_Arg1 &dpe2=ExampleDP_Arg2), or also eiwnt160/WinCC OA?ref=refs/examples/baseSample.html &dpe1=ExampleDP_Arg1 &dpe2=ExampleDP_Arg2.

HTML form

A call may also contain an HTML form with parameter input options. An HTML form automatically passes the data using the method (method="GET") according to the above syntax. All you need to add are any fixed parameters such as the HTML reference file as fixed values (type="hidden") in the form. The example of HTML references contains such a form.

The name of the input box (name="field1") always represents the name of the $parameter and the value (value="value1") is the default value for the parameter (see example).

The query data are passed to the HTTP Server by pressing a submit button (type="submit")

Example

Call the base reference "baseSample.htmlRef" after inputting the $parameters $dpe1 and $dpe2. The HTML form would be similar to:

<form action="/WinCC OA" method="GET" name="para" target="result">

<input type="hidden" name="ref" value="refs/examples/baseSample.html">

<input type="text" size="40" name="dpe1" value="ExampleDP_Arg1."><br>

<input type="text" size="40" name="dpe2" value="ExampleDP_Arg2."><br>

<input type="submit" value="Call base reference">

</form>

Here, target="result" is the target frame and input type = "hidden" is a "pseudo-input field" used to pass the parameter to the target page. The type = "submit" button actually sends the data.

You can also create these forms using an HTML editor (for example, MS-Frontpage).