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>
This is just a missing feature of WebKit. Is there some reason this is a security bug?
<rdar://problem/9285813>
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".
*** This bug has been marked as a duplicate of bug 9063 ***