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

Mozilla XMLHttpRequest


Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7) Gecko/20040630

Dear group,

below is a simple XML request. It works fine, the only problem is that
Mozilla dos not quit the data transfer mode but keeps on "waiting for data
from host..." and the Mozilla icon keeps on moving for ever. Again,
everything works fine, but it is annoying.
The same behaviour occurs with Mozilla 1.8 and GET/urlencoded data

Any hint?

thanks,
Benedikt

-
var oXMLHttpRequest = new XMLHttpRequest();
XMLHttpRequest.open("POST", "http://"+cAPPLICATIONSERVER+cSISSRV, false);
oXMLHttpRequest.setRequestHeader("Content-Type","multipart/form-data");
oXMLHttpRequest.setRequestHeader("Content-Encoding","ISO-8859-1");
oXMLHttpRequest.setRequestHeader("Accept","text/xml");
oXMLHttpRequest.setRequestHeader("Cache-Control","no-cache");

try {
oXMLHttpRequest.send(this.oXMLDoc);
try {
return oXMLHttpRequest.responseXML;
}
catch(e) {
alert('Der XML-Response kann nicht interpretiert werden');
return null;
}
return oXMLHttpRequest.responseXML;
}
catch(e) {
alert('Der XML-Stream konnte nicht geöffnet oder empfangen werden');
return null;
}

Jul 23 '05 #1
1 2111


Benedikt Wismans wrote:
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7) Gecko/20040630
below is a simple XML request. It works fine, the only problem is that
Mozilla dos not quit the data transfer mode but keeps on "waiting for data
from host..." and the Mozilla icon keeps on moving for ever. Again,
everything works fine, but it is annoying.
var oXMLHttpRequest = new XMLHttpRequest();
XMLHttpRequest.open("POST", "http://"+cAPPLICATIONSERVER+cSISSRV, false);
It seems you would want
oXMLHttpRequest.open(...)
and not
XMLHttpRequest.open(...)
oXMLHttpRequest.setRequestHeader("Content-Type","multipart/form-data");
Why the Content-Type header as multipart/form-data

oXMLHttpRequest.send(this.oXMLDoc);
this looks more like you are sending an XML document. But that is a
guess from your variable name.
return oXMLHttpRequest.responseXML;


As for that problem does that occur with any URL you are trying to load
or only with a particular URL or at least server?
Have you tried asynchronous loading, e.g.
oXMLHttpRequest.open(..., ..., true)
together with an onreadystate handler?

How are you calling the code above, maybe you are just lacking a return
false or similar in an onclick handler of a link.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

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

Similar topics

1
by: mr_burns | last post by:
Hi there, I am using the following function to import a xml file whether the users browser be IE or Mozilla: function importXML(file) { var xmlDoc; var moz = (typeof document.implementation...
5
by: niftyhawk | last post by:
Hi, Can anybody give me a simple example of how to Call Web Services from Mozilla based Browsers ? I can call web services from IE browser using web service behavior file, without any problems....
5
by: Jarson | last post by:
My JavaScript is trying to POST data to a CGI script (Perl) using XMLHttpRequest. My CGI server gets different data from IE than Mozilla Firefox. // For Mozilla, req = new XMLHttpRequest(); //...
9
by: fochie | last post by:
Greetings, I'm having a problem when I try to GET a file from my server via xmlhttp when using Mozilla. With IE I can get any type of file fine, get/display headers fine, etc. With Mozilla,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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
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...

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.