This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: Object doesn't support this property or method

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This gives me "Error: Object doesn't support this property or method"
Its an ajax code



WEB.XML


The servlet class contains doGet method

What is wrong here?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is request? You don't show us.

The deployment descriptor is not useful information.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the complete script code

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at line 6 very carefully.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear. I should have call the function, but, i just gave the reference.

I need to replace one of the label with that id

Here is what i did

HTML


Servlet class



ajax code


But, on deploying and running, It shows alert with message as "inside receiveddata", then doesn't process "document.getElementById("Text6").innerHTML = request.responseText;", goes back to function getIntroducerDetails(), again enters the receivedData(), then shows alert with message as "inside receiveddata" thrice, and then shows alert with message as "Sorry"

I am not getting why its behaving like this
 
Albareto McKenzie
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kunal Lakhani wrote:


But, on deploying and running, It shows alert with message as "inside receiveddata", then doesn't process "document.getElementById("Text6").innerHTML = request.responseText;", goes back to function getIntroducerDetails(), again enters the receivedData(), then shows alert with message as "inside receiveddata" thrice, and then shows alert with message as "Sorry"

I am not getting why its behaving like this


Are you not getting JS errors in line 5?? What's the value of that request Object? I think you may want to pass the arguments in the function declaration and use the correct object to check the status. Also would be a great idea to debug your code using Firebug or Chrome Inspector or even Internet Explorer Developer Tools, it will save you tons of time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic