• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error: Object doesn't support this property or method  RSS feed

 
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
Posts: 65833
134
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
Posts: 65833
134
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: 304
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!