aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes object required in java script error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "object required in java script error" Watch "object required in java script error" New topic
Author

object required in java script error

vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153

i am using ajax and servlet i got error object required can any body tell what is the problem





Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Your XML looks invalid to me
You are not using documentElement with responseXML
You need to debug and see what you are actually referencing.

Eric
vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
i am getting error in this line object required
document.getElementById.innerHTML=xmlDoc.getElementsByTagName("memberid")[0].childNodes[0].nodeValue;

my xml format is like this

<bookissue>
<memberid>m0001</memberid>
<bookname>c programming</bookname>
<authorname>balagurusamy</authorname>
<doi>12-oct-2009</doi>
<dd>22-oct-2009</doi>
</bookissue>

is there syntax problem in this line? can anybody tell how to get these values?




Srikkanth Mohanasundaram
Ranch Hand

Joined: Feb 07, 2007
Posts: 185
document.getElementById.innerHTML


I hope this is a typo. You have to pass the element id to this method
The XML is also invalid
<dd>22-oct-2009</doi>



Thanks,
Srikkanth
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
vijayakumar durai wrote:i am getting error in this line object required
document.getElementById.innerHTML=xmlDoc.getElementsByTagName("memberid")[0].childNodes[0].nodeValue;

my xml format is like this

<bookissue>
<memberid>m0001</memberid>
<bookname>c programming</bookname>
<authorname>balagurusamy</authorname>
<doi>12-oct-2009</doi>
<dd>22-oct-2009</doi>
</bookissue>

is there syntax problem in this line? can anybody tell how to get these values?






You have a typo in your xml there with the dd. You XML it is invalid. Read #4 here: http://radio.javaranch.com/pascarello/2006/09/12/1158096122600.html

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: object required in java script error