473,395 Members | 1,870 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,395 software developers and data experts.

ActiveX by using javascript help

26
my first question is can i define a activex object using javascript so i won't need to use IIS
and my second question is how to do so if it is possible
Jul 31 '07 #1
17 1799
gits
5,390 Expert Mod 4TB
hi ...

what do you mean with 'define' ... clientside you may use ActiveX-Objects with jscript and IE only ...

kind regards
Jul 31 '07 #2
shoram
26
define like (in the javascript area)
var obj = new createobject(...) or like
var obj = new ActivexObject(...)
Jul 31 '07 #3
gits
5,390 Expert Mod 4TB
define like (in the javascript area)
var obj = new createobject(...) or like
var obj = new ActivexObject(...)
yes ... you can ;) for example:

Expand|Select|Wrap|Line Numbers
  1. var xml_http_request_obj = new ActiveXObject('Microsoft.XMLHTTP');
  2.  
but as i said: it's IE-specific and not used by all other browsers ...

kind regards
Jul 31 '07 #4
shoram
26
thank you very much but if it wont be a problem can you tell me how to activate that object?
Jul 31 '07 #5
gits
5,390 Expert Mod 4TB
hmmm ... the object has some methods you may call ... the shown one has open(), send() etc. ... and as far as i know you may find the documentation for the most common ActiveX-Objects at msdn. when using new ActiveXObject you create an instance of the 'class' and then you may use its methods, ask for the properties etc.

kind regards
Jul 31 '07 #6
shoram
26
it really helped , thanks
Aug 1 '07 #7
gits
5,390 Expert Mod 4TB
no problem ;) ... post to the forum again when you have more questions ... anytime ...

kind regards
Aug 1 '07 #8
shoram
26
hey i want to start a control (in c# .net) using activex control
the problem is i need to start it using javascript so i dont know how to activate it

<script ...>

var myControl1 = new ActiveXObject(ActiveXDotNet.myControl);//the name of the class


//the problem is that i dont know what to do from here to send the wanted value into the activex from the html and how to activate that control that it will do what it needs to do with that value
</script>
Aug 1 '07 #9
shoram
26
and i have to not! use the IIS so i cant define the object in HTML
Aug 1 '07 #10
acoder
16,027 Expert Mod 8TB
Threads merged. Please keep all posts on one topic in the same thread.
Aug 1 '07 #11
acoder
16,027 Expert Mod 8TB
hey i want to start a control (in c# .net) using activex control
the problem is i need to start it using javascript so i dont know how to activate it

<script ...>

var myControl1 = new ActiveXObject(ActiveXDotNet.myControl);//the name of the class


//the problem is that i dont know what to do from here to send the wanted value into the activex from the html and how to activate that control that it will do what it needs to do with that value
</script>
Read up on the object in the documentation. Use the properties, attributes, methods, etc. of the class.

If you don't know how to access a particular element on the page, show your HTML code.

Also, perhaps you could explain exactly what you are trying to do. There may be a better way rather than using ActiveX.
Aug 1 '07 #12
shoram
26
no it must be activex and i unserstood all the rest but now my problem is a bit different
it says that my activex object is a null or dont exsist and i think its because script bolcker but i dont know how to handle them
Aug 1 '07 #13
shoram
26
skrech that my problem is now it says that the aotumation server can't create object and i made the initialize and script activex controls not marked as safe ... enabled
Aug 1 '07 #14
acoder
16,027 Expert Mod 8TB
skrech that my problem is now it says that the aotumation server can't create object and i made the initialize and script activex controls not marked as safe ... enabled
See if this Microsoft KB article helps. Also, see this thread.
Aug 1 '07 #15
shoram
26
how do i make an activex safe so it wont ask me if i want to use that activex because it might not be safe
Aug 6 '07 #16
acoder
16,027 Expert Mod 8TB
how do i make an activex safe so it wont ask me if i want to use that activex because it might not be safe
I've merged your threads - it's still the same problem.

Have you checked out the links? I think that you will need to sign your control (have it authenticated) to prevent the messages appearing.
Aug 6 '07 #17
shoram
26
i can create a object now because i registered the dll in the regasm and every thing is oky doky but now i need it without the annoying message when i activate that activex that says that the activex might be unsafe without changing the security levels in the internet option
somebody told me i needed to do a IObjectSafety interface but i cant find an easy example that is not in chinees.
if you can explain it to me or just send an exemple in c# that will be great
Aug 6 '07 #18

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

Similar topics

7
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) ...
6
by: Sergio Otoya | last post by:
Hi all, Is there any way of copying a file using javascript, not using the Filesystemobject (ActiveX). I need this to run in Windows and MACS. Any help would be greatly appreciated. Thanks...
2
by: Kenneth | last post by:
I am tryint to view a xml document in Internet Exploer as a ActiveX object using Javascript but it does not work. I only see the button but nothing happens when i click it. I am trying to view...
2
by: Lans Redmond | last post by:
Is there anyway to connect to a socket via javascript. Im writing an application where IE on the client pc..needs to connect to a server and get some information before forward to an action class...
1
by: TrilokChand | last post by:
Hi, Iam having a situation like whenever i click any button i want to download activex component. I find the code and it is used when ever the page is load... but my requirement is different. I...
1
by: shotokan99 | last post by:
on my page, i embedded wmp this way: <object id="mplayer" codebase=http://activex.microsoft.com/activex/ con... type=application/x-oleobject align=absmiddle classid=CLSID:22d6f312-b0f6-11......
3
Frinavale
by: Frinavale | last post by:
Hi there! I'm hoping that someone knows how to check the size of a file before it is uploaded to the server using JavaScript. I have seen suggested solutions using an ActiveX control to check...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.