Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > xmlDoc.load error

Reply
Thread Tools

xmlDoc.load error

 
 
Ang Talunin
Guest
Posts: n/a
 
      04-20-2004
Hey,

I'm trying to read an xml from another webpage with:
xmlDoc.load("http://www.otherwebsite.com/test.xml");

But this doesn't work...anybody knows a way to fix this?

thnx,

A.T.


 
Reply With Quote
 
 
 
 
Hywel
Guest
Posts: n/a
 
      04-20-2004
In article <408586cb$0$199$>,
says...
> Hey,
>
> I'm trying to read an xml from another webpage with:
> xmlDoc.load("http://www.otherwebsite.com/test.xml");
>
> But this doesn't work...anybody knows a way to fix this?


What error is your code giving you? What does the rest of you XML
loader code look like?

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
 
Reply With Quote
 
 
 
 
Ang Talunin
Guest
Posts: n/a
 
      04-20-2004

> What error is your code giving you? What does the rest of you XML
> loader code look like?


MIE -> Runtime error
Mozilla ->uncaught exception: Permission denied to call method
XMLDocument.load.
(Note: MIE works fine if i run the file on my computer)

This is the code to load the document:

function importXML()
{
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = createTable;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function () {
if (xmlDoc.readyState == 4) createTable()
};
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmldoc = new XmlDocument();
xmlDoc.load("http://www.otherwebsite.nl/test.xml");
}


 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      04-21-2004


Ang Talunin wrote:

> I'm trying to read an xml from another webpage with:
> xmlDoc.load("http://www.otherwebsite.com/test.xml");
>
> But this doesn't work...anybody knows a way to fix this?


Is that client side code? If yes then with the normal IE security
settings you can only load from the same host your HTML page with the
script is loaded from. There is an IE security setting to allow access
to data sources from different domains but don't expect anyone to lower
his IE security settings. If it is only for yourself play with the
setting, it should work then.
The best solution however is to use server side code to do such stuff.
--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57