calling a function from Javascript is not working

92 views
Skip to first unread message

Alaa Yousif

unread,
Dec 24, 2013, 12:53:59 AM12/24/13
to ff-acti...@googlegroups.com
first of all , I want to say this is a great project so keep it up.  I managed to use this control but I am having a problem calling a function inside an ActiveX control that I developed. I tried everything and so I do not know what could be missing. I can set control parameters just fine but can NOT invoke a function inside an ActiveX.  Here is an example of something that I am trying to get working but the Function  "DisplayClient" never gets called.. What am I doing wrong?

<html>
<div><span id='log'></span></div>
<object
id="mychat" logger="logger" debugLevel="7"
TYPE="application/x-itst-activex"
WIDTH="600"
HEIGHT="400"
clsid="{68459db3-59c9-449D-815b-65f729385c16}"
progid="VOICESECURE.VoiceSecureCtrl.1"
param_name="Guest5738"

>

</object>
<script type="text/javascript">
function logger(msg) {
document.getElementById('log').innerHTML += msg + '<br/>';
}


function DisplayClient()
{
alert(document.getElementById('mychat'));
var obj = document.getElementById('mychat');

obj.DisplayClient();


}
</script>
<a href="javascript:DisplayClient()"> display</a>
<a href="javascript:ReconnectClient(66)"> connect</a>
</html>

Leeor Aharon

unread,
Dec 24, 2013, 4:43:04 AM12/24/13
to ff-activex-host
Hi Alaa,

I see you have enabled logging, can you share the logs please?

Leeor.


--
You received this message because you are subscribed to the Google Groups "ff-activex-host" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ff-activex-ho...@googlegroups.com.
To post to this group, send email to ff-acti...@googlegroups.com.
Visit this group at http://groups.google.com/group/ff-activex-host.
For more options, visit https://groups.google.com/groups/opt_out.

Alaa Yousif

unread,
Dec 24, 2013, 11:04:22 AM12/24/13
to ff-acti...@googlegroups.com
Hi Leeor,  Here is the logs:
 
AxHost.TestAuthorization: returning True
AxHost.NPP_New: debug level set to 7
AxHost.verifyClsID: verified successfully
AxHost.setClsID: CLSID {68459db3-59c9-449D-815b-65f729385c16} set
AxHost.CreateControl: control created successfully
=========================================================
 
I can call functions from script using IE but not working on Chrome or FIrefox...

Leeor Aharon

unread,
Dec 25, 2013, 3:56:57 AM12/25/13
to ff-activex-host
I don't see anything strange in those logs. Sounds like you'll need to attach a debugger to the browser to understand what's going on.

Leeor.

Alaa Yousif

unread,
Dec 25, 2013, 11:50:27 AM12/25/13
to ff-acti...@googlegroups.com
Hi Leeor,
when I used try/catch then I got the following exception "Error calling method on NPObject".  What kind of debugger do you suggest? I never used Firebug, will that help?

Leeor Aharon

unread,
Jan 7, 2014, 12:22:22 PM1/7/14
to ff-activex-host
Sorry for the time it took me to respond.

I meant that I think you should use a debugger like VS to debug the plugin itself, not a JS/DOM debugger.

Leeor.
Reply all
Reply to author
Forward
0 new messages