• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

object required in java script error

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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





 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?




 
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
reply
    Bookmark Topic Watch Topic
  • New Topic