xmlDoc.load error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ang Talunin

    xmlDoc.load error

    Hey,

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

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

    thnx,

    A.T.


  • Hywel

    #2
    Re: xmlDoc.load error

    In article <408586cb$0$199 $58c7af7e@news. kabelfoon.nl>,
    please.no.spam@ no-reply.com says...[color=blue]
    > Hey,
    >
    > I'm trying to read an xml from another webpage with:
    > xmlDoc.load("ht tp://www.otherwebsit e.com/test.xml");
    >
    > But this doesn't work...anybody knows a way to fix this?[/color]

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

    --
    Hywel I do not eat quiche


    Comment

    • Ang Talunin

      #3
      Re: xmlDoc.load error

      [color=blue]
      > What error is your code giving you? What does the rest of you XML
      > loader code look like?[/color]

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

      This is the code to load the document:

      function importXML()
      {
      if (document.imple mentation && document.implem entation.create Document)
      {
      xmlDoc = document.implem entation.create Document("", "", null);
      xmlDoc.onload = createTable;
      }
      else if (window.ActiveX Object)
      {
      xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
      xmlDoc.onreadys tatechange = function () {
      if (xmlDoc.readySt ate == 4) createTable()
      };
      }
      else
      {
      alert('Your browser can\'t handle this script');
      return;
      }
      xmldoc = new XmlDocument();
      xmlDoc.load("ht tp://www.otherwebsit e.nl/test.xml");
      }


      Comment

      • Martin Honnen

        #4
        Re: xmlDoc.load error



        Ang Talunin wrote:
        [color=blue]
        > I'm trying to read an xml from another webpage with:
        > xmlDoc.load("ht tp://www.otherwebsit e.com/test.xml");
        >
        > But this doesn't work...anybody knows a way to fix this?[/color]

        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


        Comment

        • Ang Talunin

          #5
          Re: xmlDoc.load error

          > Is that client side code? If yes then with the normal IE security[color=blue]
          > 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.[/color]

          Server side isn't an option, cause I am only allowed to make *.html pages.
          Is there another way to read a page on another server???



          Comment

          Working...