Object required error

wxdqz

New Member
I'm writing a xml parser using javascript in a html file, using the activexobject(), my code works fine when i view it locally but when I upload it on a server and try to view the url I keep getting this script error and nothing displays

Line: 13
Char: 1
Error: object required
Code: 0

this is just the start which displays the company name, and <companyname> is a tag in the xml file:

<html>
<style>
.data{color:red;font-size:24px;font-weight:bold;text-align:center}
</style>
<body>
<script language=javascript>
var order = new ActiveXObject("Microsoft.XMLDOM" );
order.async=false;
order.load("invoice.xml" );
companyname=order.getElementsByTagName("companyname" );
d=companyname[0].firstChild.nodeValue;
document.write("<div class=data>"+d+"</div>" );
</script>
</body>
</html>


Does anybody know why it would work locally but not from an URL?
 
Back
Top