Board index » javascript » webservice in Opera ?

webservice in Opera ?

2005-12-24 07:25:22 PM
Hey
I have the following code:
service contains address to webservice.
var xmlDoc=document.implementation.createDocument("", "", null);
xmlDoc.async = false;
xmlDoc.load(service);
This code works perfectly in FF and NN but in Opera crashes...
If I try if(document.impleimplementation.createDocument ) opera returns true
as it was ok to use it.
Maybe you can tell me how to connect and get data from webservice ( .asmx )?
Any good website with XmlHTTPRequest ? I saw a few examples but nor of them
worked in Opera. If you have some tested code please share :)
Jarod
-
 

Re:webservice in Opera ?

Jarod wrote:
Quote
I have the following code:
service contains address to webservice.

var xmlDoc=document.implementation.createDocument("", "", null);
xmlDoc.async = false;
xmlDoc.load(service);

This code works perfectly in FF and NN but in Opera crashes...
If I try if(document.impleimplementation.createDocument ) opera returns
true as it was ok to use it.
Yes, the W3C Core DOM defines a method
document.implementation.createDocument
and Opera 8 and later at least implement that but neither the async
property nor any load method are part of the W3C DOM.
My suggestion to load XML data cross browser is XMLHttpRequest, that is
not a W3C DOM standard but Mozilla has it since 1.0, Opera since 8.0
(alas setRequestHeader method is missing in 8.00), Safari since 1.2,
Konqueror too, IE/Win as ActiveX since IE 5.
<www.faqts.com/knowledge_base/view.phtml/aid/6826/fid/616>
<www.faqts.com/knowledge_base/view.phtml/aid/17226/fid/616>
--
Martin Honnen
JavaScript.FAQTs.com/
-