Firebug causes bug: doesn't display XML Data in HTML

37 views
Skip to first unread message

ignas2526

unread,
Jul 20, 2008, 9:34:51 PM7/20/08
to Firebug
Here is HTML code:
<html>
<body>

<script type="text/javascript">
var xmlDoc=null;
if (window.ActiveXObject)
{// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument)
{// code for Mozilla, Firefox, Opera, etc.
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your browser cannot handle this script');
}

if (xmlDoc!=null)
{
xmlDoc.async=false;
xmlDoc.load("cd_catalog.xml");

document.write("<table border='1'>");

var x=xmlDoc.getElementsByTagName("CD");
for (i=0;i<x.length;i++)
{
document.write("<tr>");
document.write("<td>");
document.write(x[i].getElementsByTagName("ARTIST")
[0].childNodes[0].nodeValue);
document.write("</td>");

document.write("<td>");
document.write(x[i].getElementsByTagName("TITLE")
[0].childNodes[0].nodeValue);
document.write("</td>");
document.write("</tr>");
}
document.write("</table>");
}
</script>

</body>
</html>

And link:
http://www.w3schools.com/xml/tryit.asp?filename=tryxml_display_table
pay attention its on w3schools...

If you disable Firebug table shows fine, if you enable firebug you see
nothing.
How you guys fix it.

ignas2526

unread,
Jul 20, 2008, 9:33:31 PM7/20/08
to Firebug

ignas2526

unread,
Jul 20, 2008, 9:38:08 PM7/20/08
to Firebug

John J Barton

unread,
Jul 20, 2008, 11:22:28 PM7/20/08
to Firebug
The page fails with
Permission denied to call method Element.getElementsByTagName
http://www.w3schools.com/xml/tryit_view.asp
Line 31
I pretty much gave up on trying to understand these messages:
https://bugzilla.mozilla.org/show_bug.cgi?id=434522

Craig Hart

unread,
Aug 3, 2008, 10:15:15 PM8/3/08
to Firebug
I see the same bug... Any help?

<script type="text/javascript">

var xmlDoc=null;


if (window.ActiveXObject)
{// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument)
{// code for Mozilla, Firefox, Opera, etc.
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your web browser cannot load this page. Please enable
Javascript!!');
}
if (xmlDoc!=null)
{
xmlDoc.async=false;
xmlDoc.load("auctionstats.xml");


Errors out on the last line with firebug enabled; works fine if
disabled.

John J Barton

unread,
Aug 4, 2008, 11:24:18 AM8/4/08
to Firebug
You can try the 3.1 alpha and see if it is fixed:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Reply all
Reply to author
Forward
0 new messages