Which one to use....

J

Jonathan

Few days back I posted this question.

Can anyone help me on this question.

var myObj = new ActiveXObject("Msxml2.XMLHTTP");
var myObj = new ActiveXObject("Microsoft.XMLHTTP");

If my development environment is ASP.Net/VB.Net/.NetFramework 1.1/IE 5+
Which of the above statement I should use?
Thanks,
Jonathan Smith
 
K

Kevin Spencer

Neither. ActiveX controls are client-side.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
J

Jonathan

I am talking about client side script(java script) only.
So, which one I should use?
Thanks,
Jonathan
 
K

Kevin Spencer

You should use an <OBJECT> tag in the HTML that is sent to the client.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
J

Juan T. Llibre [MVP]

re:
So, which one I should use?

If you want to code to 1997 standards,
use "Microsoft.XMLHTTP"

If you want to code to Microsoft XML 3.0 standards,
use "Msxml2.XMLHTTP"

If you want to code to Microsoft XML 4.0 standards,
use "MSXML2.DOMDocument.4.0"

If you want to code to Microsoft XML 5.0 standards,
use "Msxml2.DOMDocument.5.0"

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_xmlprod.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmmscXML.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmmscxmloverview.asp
http://msdn.microsoft.com/library/d...en-us/xmlsdk/html/xmmscxmlinstallregister.asp





Juan T. Llibre
===========
 
J

Jonathan

Really great reply.
Since this will be clint side code, I have to say all my clients will be
using atleast IE5+.
So the next question will be IE5+ confirms to which of the following
versions?
1997 standards or Microsoft XML X.0 standards.
Thanks a lot for all the experts involved in this discussion.
Jonathan.
 
J

Jonathan

Thanks a lot.
Now I know at what time I should post the question to get good response.
Earlier posts did not get much response.
Jonathan
 
M

Matt Berther

Hello Kevin,

Why would he use <OBJECT> to create an ActiveX object in javascript?

Jonathan,

The answer is to use MSXML2.XMLHTTP.
 
K

Kevin Spencer

Neither. You should use an <OBJECT> tag in the HTML that is sent to the
client.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
K

Kevin Spencer

You don't create the object with JavaScript. You create the object with an
<OBJECT> tag. You manipulate the object with JavaScript.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
J

Juan T. Llibre [MVP]

Hi, Matt.

Kevin meant this type of object creation:

<object runat="server" progid="msxml2.DOMDocument.5.0" id="xObj"> </object>

Which may be slightly preferrable to :

JavaScript
var xml = new ActiveXObject("Msxml2.DOMDocument.5.0");

VBScript
Dim xml
Set xml = CreateObject("Msxml2.DOMDocument.5.0")

Those types of object creation replace the legacy :

var source = Server.CreateObject("MSXML2.DOMDocument");
or
var xml = new ActiveXObject("Msxml2.DOMDocument.2.6");.



Juan T. Llibre
===========
 
K

Kevin Spencer

Learn something new every day... Thanks! :=)

I learn something new every day too!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top