Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Loading xml in JavaScript Fails

 
karthick ryan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
This is the piece of code which i used. Please go through it. This doesnt seem to work.

<script language="Javascript">
<!--
var xmlObj;
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

xmlDoc.async = false;
xmlDoc.load("web.xml");
// The xml file is present in the same folder where this jsp file is present

xmlObj = xmlDoc.documentElement;
alert(xmlObj); //i get a "null" here

-->
<script>
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
"karthik",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning

This is your last warning. Please fix your display name and repost your request.

thanks,
Dave
 
    Bookmark Topic Watch Topic
  • New Topic