Вопрос

I am trying to use some software from WonderWare via ActiveX. I have gotten the object to appear, but I am want to pass some parameters to it and eliminate having to setup the object everytime. There are two versions of the control ActiveX and .NET. I haven't gotten the .NET control to work at all, but I can get the ActiveX one / just not the parameters.

Here is what the manual says about it:

The aaHistClientTrend control allows you to run the Wonderware Historian Client Trend program (or a functional subset) from within the Wonderware InTouch HMI software or a .NET container like Visual Basic .NET or Internet Explorer.

The HTML code that I have:

<html>
<head>
<body>
   <object id="aTrend1" classid="clsid:E08609F1-58CC-11D3-B1CF-00105AA45077" viewastext="" height="100%" width="100%" />
</body>
</head>
</html>

I try to pass the parameter via:

<script language="JavaScript">
    document.aTrend1.TagPickerVisible = false; 
</script>

And it crashes internet explorer.

EDIT : Any ideas?

Это было полезно?

Решение

I figured out a way to do it. Not sure it's the only way, but it works.

<html>
<head>
<script>
function fxnTrend()
    {
    aTrend1.ToolBarVisible = false; 
    aTrend1.TagPickerVisible = false; 
    aTrend1.RealTimeMode = true;
    aTrend1.TimeBarVisible = false;
    aTrend1.GridVisible = false;
    }
    fxnTrend();
</script>

<body onLoad="fxnTrend()">
    <object id="aTrend1" classid="clsid:E08609F1-58CC-11D3-B1CF-00105AA45077" viewastext="" height="100%" width="100%" />
</body>
</head>
</html>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top