473,324 Members | 2,246 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,324 software developers and data experts.

can not create activexobject("microsoft.xmlhttp")

2
hi,
I have some client with IE 6 sp1 that when I run the following line I have an exception :
var poster = new activexobject("Microsoft.xmlHttp"|);
The web page that call this js line is ssl.
Do you have an idea why it works on some computers and on others not?
Thanks
Jan 1 '07 #1
3 7650
ronverdonk
4,258 Expert 4TB
Could be you are using a lower JavaScript version (< 5) and have to use Msxml2.XMLHTTP. The following snippet of code handles this also for older versions. Try it and see if the error persists.
[html]//Create a boolean to check for a valid IE instance.
var xmlhttp = false;

//Check if we are using IE.
try {
//If the Javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using MS.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}

//If using a non-IE browser, create a js instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}[/html]
Ronald :cool:
Jan 1 '07 #2
ronlym
2
Hi,
I have a page that call the following line in js :
var x = new activexobject("Microsoft.xmlhttp");

This line works on some computers and do not work on anothers.
All the computers have IE6 sp1.

The page that call the js run under ssl.

Do you have an idea what is the problem?

Thanks
Jan 2 '07 #3
ronverdonk
4,258 Expert 4TB
You are double posting in this thread!!

Before starting this double thread, why don't you first look at the reply posts in your original thread at http://www.thescripts.com/forum/thread582818.html

Ronald :cool:
Jan 2 '07 #4

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

Similar topics

1
by: PISINC | last post by:
I am having a problem creating an instance of the Acrobat application COM component ("AcroExch.App") with C#. The component "AcroExch.App" lives in the Acrobat executable, and you can't add...
1
by: AmiciDan | last post by:
When I attempt to create a new project in Visual Studio .NET 2003, I do NOT have the option to create the following: Microsoft Office 2003 Projects What do I need to install or do to get this...
3
by: Bad_Kid | last post by:
myForm is 500x400 px and it has panel1 control which is 4000x200 px!! how can I create scrollbar on a panel1 so it's contents may be scrolled left and right? (c++.net)
0
by: jesper.hvid | last post by:
Hi. I've noticed, after moving some of our code to 2.0, that System.Net.WebRequest.Create(System.String) and System.Uri(System.String) no longer behave as they did in 1.1 framework. Example:...
0
by: penguinc | last post by:
Please help, using Nortwind example database from Microsoft, purchasing is fine, but unable to try to select vendor then select invoices, display total then enter payment info. Best regards, Thank...
1
by: H | last post by:
Just trying to create a basic xmlhttpobject. However, the following always returns null xmlhttpobj = New ActiveXObject("Microsoft.XMLHTTP") (it is Microsoft. and not Msxml2. I've already...
4
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi there, I want to use javacript in my ASPX page, using ActiveX ( ActiveXObject("Shell.Application"); ) to call external application. How I know if the IExplorer settings for ActiveX is...
7
by: czechboy | last post by:
Hi, I would like to send DELETE request to google calendar but nothing of this works: xmlhttp.open("POST",del,false); xmlhttp.setRequestHeader("X-HTTP-Method-Override", "DELETE");...
4
by: dougmeece | last post by:
Hello everyone, I have created a search button but I receive the message "Microsoft Access can't fine the field "|" referred to in your expression" when I try to use it. I have looked online for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.