Re: xml/html/js code works in IE but not in Mozilla based browsers

Lucky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Cox Communications
Message-ID <Lidhe.26872$Um.2423@lakeread08>
David Schele wrote:
> My architectural practice uses a program that allows us to publish our
> drawings to our web site www.feldergrp.com (button: Projects now bidding.)
> An html document drives the page; an XML document stores the variables such
> as thumbnails, drawing files, and summary information; and several
> javascript routines build the page contents from the xml document.  This
> combination works fine in IE but not in any Mozilla based browser; and the
> developer seems to have no interest in making it work in any other browser
> than IE.
> 
> 
> 
> The html code (abbreviated) looks like this:
> 
> </head>
> 
> 
> 
> <xml id="adsk_ptw_xml" src="acwebpublish.xml"></xml>
> 
> 
> 
> <body class="IMAGE">
> <table >
>         <tr>
>                 <td><div id="adsk_ptw_page_description"></div></td>
>         </tr>
> </table>
> <script src="adsk_ptw_page_description.js" language="javascript"
> type="text/javascript"></script>
> 
> </body>
> 
> The javascript code attempts to retrieve the data from the xml document
> through code like this:
> 
> function adsk_ptw_page_description_main() {
>     var xmle=adsk_ptw_xml.getElementsByTagName("publish_to_web").item(0);
> 
> Mozilla based browsers throw the error "adsk_ptw_xml is undefined" in
> adsk_ptw_page_description.js" and halt. I tried moving the <xml> declaration
> into the <body>, but there was no change.
> 
> 
> 
> Apparently, the initial <xml> declaration in the html code is where the
> problem begins. It is recognized by the javascript in IE but not in Mozilla.
> I know some html and a very little javascript, but I am clueless as to how
> to fix this and would appreciate any help.
> 
> 
> 
> 
For starters there is no <xml/> element in the HTML 4.01 spec

http://www.w3.org/TR/html401/index/elements.html

and wait, um.. nope

none in xhtml either :(

yea, i'm a bit bummed to, is a very sweet simple task to embed the xml 
in your page.

i'm quite positive you should be able to make something work either by 
pulling in the code with javascript, or -moz-binding: some xbl to 
understand the <xml/> tag?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.