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

Microsoft.XMLHTTP problem

Hi all,

Here is the problem, i'm using Microsoft.XMLHTTP for ie and
XMLHttpRequest for mozilla, on my local server which is win2000 server
i've no problem with that but when i uploaded the file to the web
server of our company which is redhat 9 i still have no problem with
mozilla but the ie gives an error like this,

System error: -1072896658

I have no clue what that means but as i sad the same page work fine on
my local server. On our rh9 server the site works over https, is
Microsoft.XMLHTTP does any security issues about https?

And my code is;
<scrip...
var xmlhttp=false;
function getData(u,m,n) {
if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
xmlhttp.open("GET", u, true);
xmlhttp.onreadystatechange=function() {
do
{
document.getElementById(n).innerHTML=m;
}
while(xmlhttp.readyState==200)
if (xmlhttp.readyState==4) {
document.getElementById(n).innerHTML=xmlhttp.respo nseText;
}
}
xmlhttp.send(null)
}
</...>

Thanks for helping,

Jul 23 '05 #1
12 13752


Botan Guner wrote:

Here is the problem, i'm using Microsoft.XMLHTTP for ie and
XMLHttpRequest for mozilla, on my local server which is win2000 server
i've no problem with that but when i uploaded the file to the web
server of our company which is redhat 9 i still have no problem with
mozilla but the ie gives an error like this,

System error: -1072896658
For which line/statement of your code does it give that error?
xmlhttp.onreadystatechange=function() {
do
{
document.getElementById(n).innerHTML=m;
}
while(xmlhttp.readyState==200)


readyState takes values of 0, 1, 2, 3, 4 so I don't know why you check
for the value 200. And a blocking while loop in an event handler is not
a good idea as that way other events could not be processed. But in your
case the loop will not block as the condition readyState == 200 is never
true so while you should remove that loop that is not likely solving the
error problem you have.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
It gives at line;

document.getElementById(n).innerHTML=xmlhttp.respo nseText;

and if i set the readyState anything other then 200 it stops responding

Jul 23 '05 #3


Botan Guner wrote:
It gives at line;

document.getElementById(n).innerHTML=xmlhttp.respo nseText;

and if i set the readyState anything other then 200 it stops responding


You are setting readyState? Not sure what that is supposed to be good for.
As for that line, how does responseText look when the error occurs?

Also consider checking
xmlhttp.status
and
xmlhttp.statusText
perhaps something goes wrong with the HTTPS access and the HTTP status
message tells what goes wrong.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
I thing HTTPS access is my main problem because this script works good
on my local server and remote server (with mozilla) the only problem is
browsing the page with internet explorer. Mozilla outputs nothing. I
wish it generates an error nothing can be understood from the error
that internet explorer gives.

Jul 23 '05 #5


Botan Guner wrote:
I thing HTTPS access is my main problem because this script works good
on my local server and remote server (with mozilla) the only problem is
browsing the page with internet explorer. Mozilla outputs nothing. I
wish it generates an error nothing can be understood from the error
that internet explorer gives.


Even over HTTPS the response has
status
statusText
and you could check them to find out more as to what goes wrong.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #6
i have checked ;
xmlhttp.status=200
xmlhttp.statusText=OK
wrote and error dialog opened.

Jul 23 '05 #7

Botan Guner wrote:
i have checked ;
xmlhttp.status=200
xmlhttp.statusText=OK
The HTTP(S) works fine then,
wrote and error dialog opened.


we would need to look then into the responseText and the assignment.
Do you get that error too when you do not assign to innerHTML but
instead simply
alert(xmlhttp.responseText)
?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #8
when i wrote,

alert(xmlhttp.responseText);

before the,
documen....getElemen...innerHTML=xmlhttp.responseT ext;

it gives an empty alert so responseText is empty but at the same time
when i request the same page from my local server it alerts the code
returned from the requested page.

Jul 23 '05 #9
VK
You may want to start with this very generic script (the actual call
for getData is up to you). If it works, then the problem with your
script, not with Hedhat.
<script>
var XDataReader = null;

function getData(u,m,n) {
if (window.ActiveXObject) {
XDataReader = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
XDataReader = new XMLHttpRequest();
}
else {
/*NOP*/
}
if (XDataReader != null) {
XDataReader.open("GET", u, true);
XDataReader.onreadystatechange = checkState;
XDataReader.send(null);
}
}

function checkState() {
if (XDataReader.readyState == 4) {
if ((XDataReader.status == 200)||(XDataReader.status == 0)) {
// Status 0 is given in IE if you load a file
// from your local file system. If you don't
// need to debug it there, you may remove it
XDataReader.onreadystatechange = foo;
// Lock the event handler for Opera,
// which gives sometimes double bubble
// for the same event
alert(XDataReader.responseText);
}
}
}

function foo() {
/*NOP*/
}
</script>

Jul 23 '05 #10
VK wrote:
You may want to start with this very generic script ... <snip> <script>
var XDataReader = null;

function getData(u,m,n) {
if (window.ActiveXObject) {
XDataReader = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
XDataReader = new XMLHttpRequest();
}
else {
/*NOP*/
}
if (XDataReader != null) {
XDataReader.open("GET", u, true);
XDataReader.onreadystatechange = checkState;
XDataReader.send(null);
}
}

<snip>

Using a single global variable to store a reference to the
XMLHttpRequest object while making asynchronous requests is a recipe for
disaster.

Richard.
Jul 23 '05 #11
Use the MS Script Editor included free with MS Office 2002 and above,
for debugging Internet Explorer (IE).

This subject is of great interest to many JS developers, as there is no
obvious, low cost way to do sophisticated debugging in
IE6 other than to use the debugger described below, which is horribly
documented otherwise. I feel debugging is an important aspect of
projecting the useability of the language and needs to be made more
clear for new users.
Jeff Papineau
yo**@mandala.com
<FAQENTRY>

This is a page that describes how to install and use the MS Script
Editor to debug Javascript in Internet Explorer ( IE ). It has a
powerful debugger built into it that works really well for developers
supporting IE5+. This debugger/editor included with most versions of
Microsoft Office.

http://www.mandala.com/javascript/debug_javascript.html

..NET programmers may have better tools (VStudio) but this comes in
really handy for anyone developing with JSP and PHP and other dynamic
scripting languages which embed javascript, as well as any HTML page
using Javascript in Internet Explorer that needs a (almost) free
debugging environment.

</FAQENTRY>

Jul 23 '05 #12
Thanks everybody, for your help and concern.

Jul 23 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Irene | last post by:
Hi, I have an asp page that allows a user to search for info in a DB and add info to a DB. The search uses "ADODB.Connection" objects in the page, but the add will use a call to an isapi dll...
1
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
39
by: tydbowl | last post by:
I have a problem where the below code chunk causes handle leaks on some machines. The leak APPEARS to be handles to the registry key: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet...
1
by: Ike | last post by:
Ive copied an online example for writing out a php file, programmatically, then would like to re-display that data in a browswer window that automatically refreshes as the data file (getdata.php,...
1
by: KoosJaspers | last post by:
I have a remarkable problem. Opening a file using xmlhttp works perfectly. The responseText output is read, since it can be assigned to an alert() message, as follows : alert(xmlhttp.resposeText)...
13
by: yawnmoth | last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP. If my understanding is correct, the different numbers refer to...
2
by: Skyblue | last post by:
I use Microsoft.XMLHTTP to access htm or asp pages on a central web site from other satellite sites. In this way, the same content can be displayed on a dozen websites and I only need to update one...
14
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
I've been searching everywhere online to find an alternative method besides using Microsoft.XMLHTTP (as it freezes the server up alot!!) but with no luck at all. I am using server side ASP, and...
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");...
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
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.