i am trying to use mscomm in html and javascript to communicate with a device over the serial port but when i run a test of the activex object in a .hta file i get the error "Automation server can't create object". does anybody know why its doing this?
it gives the error on the line with var mscomm = new activex.........

<OBJECT classid="clsid:648A5600-2C6E-101B-82B6-000000000014" id="MSComm1" CodeBase="mscomm32.ocx" type="application/x-oleobject" style ="display: none"> 
<PARAM NAME="_ExtentX" VALUE="1005"> 
<PARAM NAME="_ExtentY" VALUE="1005"> 
<PARAM NAME="_Version" VALUE="393216"> 
<PARAM NAME="CommPort" VALUE="1"> 
<PARAM NAME="DTREnable" VALUE="1"> 
<PARAM NAME="Handshaking" VALUE="0"> 
<PARAM NAME="InBufferSize" VALUE="1024"> 
<PARAM NAME="InputLen" VALUE="0"> 
<PARAM NAME="NullDiscard" VALUE="0"> 
<PARAM NAME="OutBufferSize" VALUE="512"> 
<PARAM NAME="ParityReplace" VALUE="63"> 
<PARAM NAME="RThreshold" VALUE="0"> 
<PARAM NAME="RTSEnable" VALUE="0"> 
<PARAM NAME="BaudRate" VALUE="9600"> 
<PARAM NAME="ParitySetting" VALUE="0"> 
<PARAM NAME="DataBits" VALUE="8"> 
<PARAM NAME="StopBits" VALUE="0"> 
<PARAM NAME="SThreshold" VALUE="0"> 
<PARAM NAME="EOFEnable" VALUE="0"> 
<PARAM NAME="InputMode" VALUE="0"> 
</OBJECT> 

<script > 
var msComm1 = new ActiveXObject("MSComm1Lib.MSComm.1"); 
var test = msComm1.CommPort;

</script>

any help is greatly appreciated

It may be your local browser security set up. The error seems to display the permission problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.