Which one to use....

  • Thread starter Thread starter Jonathan
  • Start date Start date
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
 
Neither. ActiveX controls are client-side.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
I am talking about client side script(java script) only.
So, which one I should use?
Thanks,
Jonathan
 
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.
 
Thanks,
Sorry, I am not clear.
Which below one I should use.
Jonathan
 
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
===========
 
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.
 
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
 
Hello Kevin,

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

Jonathan,

The answer is to use MSXML2.XMLHTTP.
 
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.
 
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.
 
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
===========
 
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

Similar Threads


Back
Top