Bug 58519

Summary: unable define XML DOM object
Product: WebKit Reporter: aluri balahari <alurib>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: abarth, aestes, inferno
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   

Description aluri balahari 2011-04-14 00:08:24 PDT
the error is "object # <Document>has no method load".

well i am using dom object it works fine in IE,MOZILLA but not in crome ,unable to execute load method .the code is 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" >
function loadXMLDoc(file)
{
try
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
catch(e)
{
try
{
xmlDoc=document.implementation.createDocument("","",null);
}
catch(e)
{alert(e.message)
}
}
try
{
xmlDoc.async=false;
xmlDoc.load(file);
return(xmlDoc);
}
catch(e)
{ alert(e.message)
}
return (null);
}
function getNeela()
{
var xmlFile=loadXMLDoc("books.xml");
var neelaCount=xmlFile.getElementsByTagName("title")[0].childNodes[0].nodeValue;
var id=document.getElementById("fname").value;
if(neelaCount==id)
{
return true ;
}
else
{
alert("Sorry Wrong ID,Try Again...!!!");
return false;
}
}

</script>

</head>
<body style="background-color:#FAFFF6">

<form action="content1.htm" method="post" >
<table align="center" style="font-family:Arial;color:brown;border:3px solid green;font-weight:bold"> 
<tr>
<td>Enter Employee ID</td>
<td><input type="text" id="fname"/></td>
</tr>
<tr>
<td ></td>
<td><input type="submit" value="Enter" onclick="return getNeela()"/></td>
</tr>
</table>
</form>
</body>
</html>
Comment 1 Adam Barth 2011-04-14 08:46:28 PDT
This is just a missing feature of WebKit.  Is there some reason this is a security bug?
Comment 2 Lucas Forschler 2011-04-14 11:38:32 PDT
<rdar://problem/9285813>
Comment 3 aluri balahari 2011-04-14 11:46:32 PDT
Hi i am sorry,this is not a securit bug,it's just a crome browser bug,unable to  define DOM object xmlhttprequest.load(),it's just couldn't recognize the object,if you run the code ,the error is ....
------------------------------------------

Object#<Document>  has no method "load".
Comment 4 Alexey Proskuryakov 2011-04-18 20:01:00 PDT

*** This bug has been marked as a duplicate of bug 9063 ***