• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic