0

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?

PaulMcG
  • 62,419
  • 16
  • 94
  • 130
Ty.
  • 187
  • 1
  • 2
  • 13
  • TagPickerVisible isn't a property of this object. The attached code lists its members and methods. `var d = []; for(var i in document.aTrend1) d.push(i); d.sort(function(a,b){return a > b}); for(var i = 0; i < d.length; i++) console.log(d[i]);` – CBusBus Feb 20 '13 at 18:23
  • Are you saying to run that command and it will list the available members and methods? If so where is the console.log stored so I can see a list? – Ty. Feb 21 '13 at 18:49
  • 1
    console.log() is a firefox firebug extension method. If you don't use firebug you could always replace the console call with write or some other means of writing to the document. – CBusBus Feb 21 '13 at 18:59
  • I installed firebug, but I don't know how to copy and paste the console.log, it doesn't paste well. I don't really know what I am looking at. In the manual it has TagPickerVisible listed and in a "working" javascript that a vendor installed, that parameter is working. I just can't replicate it. There is a good bit of that code and it's complicated. I can't figure it out. – Ty. Feb 22 '13 at 17:45

1 Answers1

0

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>
Ty.
  • 187
  • 1
  • 2
  • 13