Results 1 to 5 of 5

Thread: XML and Javascript

  1. #1

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159

    XML and Javascript

    Hi,

    I have a web page that uses an XML file and some javascript to display a dynamic page. I have designed this using Microsoft tools, and I am happy with it's functionality on MSIE5.5 upwards. I have reports from my users who are running Netscape and Opera that say the page errors. When I investigate, I get the following error:

    Expression evaluated to null or undefined and is not convertible to object: xmlDoc.root

    This is one of the first lines of code in my page. I have embedded object tags in the HTML page that generates the xmlDoc part of the code. as below:

    <OBJECT classid="clsid:CFC399AF-D876-11D0-9C10-00C04FC99C8E" id="MSXML" Name="xmlDoc" viewastext></OBJECT>

    This works fine for IE but not in Netscape or Opera.

    Can anybody please help me out? Does anybody use XML within a web page in Netscape or Opera?

    Thanks in advance,
    DJ

  2. #2
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329
    I believe you use the EMBED tag, not the OBJECT tag with Netscape. Don't know about Opera.

  3. #3

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159
    Originally posted by DKCK
    I believe you use the EMBED tag, not the OBJECT tag with Netscape. Don't know about Opera.
    Do you know if the EMBED tag works with IE? It is only really Netscape that I am worried about at the mo - opera can wait for a while.....

    Thanks,
    DJ

  4. #4
    Addicted Member
    Join Date
    Aug 2000
    Location
    Pennsylvania, USA
    Posts
    168
    I dunno if you need to worry about it, but I don't see any way how that HTML would work on any a web broswer in any operating system (ie Mac or Unix). Or, for that matter, if the user does not have MSXML installed on their Windows PC.

    They wouldn't have the class installed to load into the page.
    Wydok

    "It would appear that we have reached the limits of what it is possible to achieve with computer technology, although one should be careful with such statements, as they tend to sound pretty silly in 5 years."

    -John Von Neumann ca. 1949

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    <object> os an MS proprietary tag that is completly adapted to the windows COM and OLE Automation.
    I think Mozilla will in time implement the tag using their XPCOM, but that would still mean that the object you want must be reimplemented using XPCOM, which won't happen for MSXML.
    So what you want to do won't work ever on any Gecko-based browser. It is not cross-platform either, and it wouldn't work on my IE because I have ActiveX enabled only on request.

    For other things that use the object tag in IE (e.g. Flash movies), use the embed tag in other browsers. There is a special syntax to combine the two.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width