Bug 66816 - Please support Mozilla's XMLHttpRequest extension
Summary: Please support Mozilla's XMLHttpRequest extension
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-29 08:34 UTC by ieure
Modified: 2004-06-12 17:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ieure 2003-10-29 08:34:28 UTC
Version:           unknown (using KDE 3.1.92 (CVS >= 20031019),  (testing/unstable))
Compiler:          gcc version 3.3.2 (Debian)
OS:          Linux (i686) release 2.4.22-hadron

I have some scripts which require the ability to fetch a file via HTTP to function properly. I'd like to see support for Mozilla's XMLHttpRequest method of doing this, or some equivalent.
Comment 1 Oded Arbel 2004-02-23 21:07:13 UTC
I think that this would very useful. there are many sites that use this extension alot.
Comment 2 Stephan Kulow 2004-02-24 10:57:39 UTC
Like? 
Comment 3 Oded Arbel 2004-02-24 11:03:26 UTC
http://www.orkut.com
Comment 4 Stephan Kulow 2004-02-24 11:08:49 UTC
ok, and another to support your "many" statement?
Comment 5 Oded Arbel 2004-02-24 13:21:02 UTC
Oh, sorry - that's the most visible. I can't show any other publicly accessible websites but I'm sure there are others. I've personally seen 4 more who use about the same logic as Orkut: The Israeli's ministry of transportation on-line shop (where you can renew a driver license) is also based on .net so it might be related. Also, in three not related consulting gigs I was involved in, someone at some stage wanted to use or already used xmlHttpRequest with the argument that its ok to use it as its perfectly cross-platform - it works on both IE and Mozilla. 
That's MS-Windows mindset at its best, but still they have a point
Comment 6 Chad Whitacre 2004-03-17 15:46:11 UTC
We we will be using this more and more in Plone (www.plone.org) and would love to see it supported in Konqueror.
Comment 7 Michael Clark 2004-04-01 14:54:48 UTC
It is used by most of the a few of the more modern Javascript remote scripting frameworks. eg. http://sarissa.sourceforge.net/
                                                                                
I am working on one too which i'd like to work with konqueror:
                                                                                
  http://oss.metaparadigm.com/jsonrpc/
                                                                                
It requires a working XMLHttpRequest object.
                                                                                
We have a few internal web apps using this sort of functionality to avoid page reloading (by sending XML-RPC messages). It is the way of the future for web apps.
                                                                                
BTW - Safari has this object working.

I notice in 3.2.1 the object is there but I just get "undefined" after doing a send on the object.
Comment 8 Rene Horn 2004-04-11 11:21:33 UTC
This bug was resolved in the latest version of Safari.

David Hyatt talks about it here:
http://weblogs.mozillazine.org/hyatt/archives/2004_02.html#004874
Comment 9 hector 2004-04-27 08:24:53 UTC
In 3.2.0 the object is there too and if using synchronous doesn't throw any exception.
It doesn't seems right.

i had to add this workaround



function main() {
	try {
		var queryStr = query_browser();
		if (navigator.vendor.indexOf('KDE') != -1)
			throw new Error('KDE XMLHttpRequest Object buggy');
		var req = getHttpReq();
		req.open('POST', '<?php echo $_SERVER['PHP_SELF'];?>', false);
		if (errorStr != 'hecchan_js_error_checker')
			queryStr += (errorStr + 'User Agent: ' + navigator.userAgent +sep + sep);
		req.send(queryStr);
		window.location = '<?php print($_SESSION['ReqPage']);?>';
		
	} catch(e) {
		log_error(e);
		if (errorStr != 'hecchan_js_error_checker')
			queryStr += (errorStr + 'User Agent: ' + navigator.userAgent +sep + sep);
		send_by_form(queryStr, '<?php echo $_SERVER['PHP_SELF'];?>', 'hecchan_js_checker');
	}
}

I hope konqueror will fix it soon...
Comment 10 Zack Rusin 2004-06-12 17:41:56 UTC
CVS commit by zrusin: 

After long, long wait they're finally here: XMLHTTPRequest and XMLSerializer.
Safari code was pretty nice but because of the id handling differences, kio,
http headers and xml parsing problems it took me way more time then it should.
So yeah, Orkout fans please stop emailing us.

CCMAIL:66816-done@bugs.kde.org


  M +1 -1      dom/dom_doc.h   1.43
  M +5 -1      ecma/Makefile.am   1.46
  M +5 -1      ecma/kjs_window.cpp   1.377
  M +1 -1      ecma/kjs_window.h   1.104
  M +513 -12   ecma/xmlhttprequest.cpp   1.2
  M +87 -5     ecma/xmlhttprequest.h   1.2