473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

GeckoActiveXObject for Mozilla

6
Hi,

I am creating an object of .Net ActiveX dll using GeckoActiveXObject in the javascript.

Object is created but can not call a method of the dll using this object.
It is giving an error like "Type error ...test2() is not a function"

My javascript function is..

Expand|Select|Wrap|Line Numbers
  1. function comEventOccured()
  2. {
  3.        try
  4.        {
  5.       if(window.GeckoActiveXObject) 
  6.              alert("gecko present");
  7.             a = new GeckoActiveXObject("ParialTestClass.Class1");
  8.             alert(a);
  9.              var b = a.test2("aa"); ////error is coming on this line
  10.            }
  11.       catch( e )
  12.          {
  13.            alert("exception..."+e);
  14.          }
  15. }
Sep 26 '07 #1
10 4644
acoder
16,027 Expert Mod 8TB
Please remember to use code tags when posting code:
[CODE=javascript]
Javascript code goes here...
[/code]
Sep 26 '07 #2
hir
6
Please remember to use code tags when posting code:
Expand|Select|Wrap|Line Numbers
  1. Javascript code goes here...
  2.  
sorry for that..actually i have recently joined this forums so did not know that..
thanks
Sep 28 '07 #3
dmjpro
2,476 2GB
Hi,

I am creating an object of .Net ActiveX dll using GeckoActiveXObject in the javascript.

Object is created but can not call a method of the dll using this object.
It is giving an error like "Type error ...test2() is not a function"

My javascript function is..

Expand|Select|Wrap|Line Numbers
  1. function comEventOccured()
  2. {
  3.        try
  4.        {
  5.       if(window.GeckoActiveXObject) 
  6.              alert("gecko present");
  7.             a = new GeckoActiveXObject("ParialTestClass.Class1");
  8.             alert(a);
  9.              var b = a.test2("aa"); ////error is coming on this line
  10.            }
  11.       catch( e )
  12.          {
  13.            alert("exception..."+e);
  14.          }
  15. }
ActiveXObject works with IE only,

Kind regards,
Dmjpro.
Sep 28 '07 #4
hir
6
ActiveXObject works with IE only,

Kind regards,
Dmjpro.
ya thats true but i m executing following code in Mozilla/Firefox.

In case of IF it is perfectly working fine using CreateActiveXObject but in case of Mozilla i am using GeckoActiveXObject which is not working
Sep 28 '07 #5
acoder
16,027 Expert Mod 8TB
ya thats true but i m executing following code in Mozilla/Firefox.

In case of IF it is perfectly working fine using CreateActiveXObject but in case of Mozilla i am using GeckoActiveXObject which is not working
I assume you're using the Mozilla ActiveX plugin. Make sure the version number exactly corresponds with the version that you have. According to that page, it only goes up to 1.5. I don't think it will work on newer versions.
Sep 28 '07 #6
hir
6
I assume you're using the Mozilla ActiveX plugin. Make sure the version number exactly corresponds with the version that you have. According to that page, it only goes up to 1.5. I don't think it will work on newer versions.
ok.then what if i want to do the same thing on higher version?
Am i going in the right direction? or i have to create Plugin using NPAPI for moizlla and call my .net activex dll in it?
Sep 28 '07 #7
acoder
16,027 Expert Mod 8TB
Is there any particular reason why you want to use ActiveX in Mozilla?
Sep 28 '07 #8
hir
6
yes, actually we have a project in which we have to create a .net dll with number of methods.These methods in turn will communicate with database via webservices.
Now, on the interface side , the frontend is developed in flex which can be opened up in either IE or Mozilla/Firefox.
So the Javascript and the Flex client will be on the same page and from the javascript we will have to call methods from the .net dll.

In case of IE we have achieved this using CreateActiveXObject.
But in case of Mozilla i could not find the way to do the same thing.

I know this is a bit complicated.
:)
Sep 28 '07 #9
acoder
16,027 Expert Mod 8TB
Is this for a custom/legacy application or for an intranet user group?

If it is, just use IE for that particular application.

If not, this plug-in is not recommended for widespread use.
Sep 28 '07 #10
gits
5,390 Expert Mod 4TB
Is this for a custom/legacy application or for an intranet user group?

If it is, just use IE for that particular application.

If not, this plug-in is not recommended for widespread use.
yes ... i fully agree ... in case you have a closed/strict IE environmet using activeX may be a good idea ... in case you need a cross-browser application ... it is really a bad idea ... in this case you should use another technology ... have a look: we create a XUL-based intranet-application ... so a user HAS TO use a gecko-based browser ... we would never try to make that cross-browser-applicable ... it would be too much effort and whatfor? we simply say: 'use mozilla to use the application ... its an intranet so we can :) ' ... in case we would have to create a webapplication ... we wouldn't had used the XUL-technology ... for sure ;)

kind regards
Sep 28 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Neil Zanella | last post by:
Hello, I just ran into an interesting problem with cookies while using PHP 4 and Mozilla 1.6. Basically, I have been using PHP on a site called: foo.bar.net?script.php Within that script I...
4
by: Jakub Fast | last post by:
Hi, Does anybody know how far you can get nowadays with trying to use Python as the script language for XUL instead of JS? Is it possible (even theoretically) to write full-fledged applications...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
3
by: scott simpson | last post by:
ns 7.1 on win2k: i am trying to sniff out the (ax) version of the NS browsers and am not having any luck. both of the following alert 'undefined': alert('GeckoActiveXObject=' + typeof...
3
by: Jim Ley | last post by:
Hi, It seems the mozilla guys have chosen another (almost certainly poor choice in my initial thoughts) of having document.all evaluate to false, but document.all catch the chicken event - also...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
20
by: Thorsten Kampe | last post by:
Hi, I've already sent this to the Komodo mailing list (which seemed to me the more appropriate place) but unfortunately I got no response. I'd like to build a Python GUI app. Neither Tkinter...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.