![]() |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Please use our Code Center to obtain source-code and example projects/solutions: http://codecenter.softwaretoolbox.com
The following example shows you how you can create a scripted-application that runs from within Internet Explorer itself. Syntactically speaking, reading a regular (single-value) Tag or an Array-Tag is requires the exact
same coding as far as requesting the data. The only difference is with the return value and how you access the values of the array. Objective The web-page we will create will have a button and a textbox only. The value of the Array-Tag will be shown in the textbox upon clicking the button. Each value of the array
will be shown with comma's separating the values, i.e. 1, 2, 3, 4, 5, 6 This example assumes that you have the Software Toolbox TOPServer installed along with a customized "simdemo.opf"
project that contains Tags of type Array. You can download our test project here.. Source code Our click-event handler will instantiate the OPC Web Client, make the call to read the Tag Array and then display it's values in the textbox. Here goes: IMPORTANT: When working with Tag arrays, it is IMPORTANT that your application/script
detect that a value is an array prior to treating the object as if it were an array. You will see in our examples (below) that this is how we suggest and recommend your applications/scripts work too. Simply place the above text under the "</body>" HTML tag and then save your HTML page. Now open that web-page directly from Internet Explorer and then click on the button. JAVASCRIPT Feature not currently supported within Javascript due to the differences in Array handling for this development language. This feature will be made available in the next product release.
|
||||||||||||||||||||||||
|
Copyright Software Toolbox, Inc., 1996-2004, All Rights Reserved Worldwide. |
||||||||||||||||||||||||