wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Error: Object doesn't support this property or method 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 "Error: Object doesn Watch "Error: Object doesn New topic
Author

Error: Object doesn't support this property or method

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
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?


kunal
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

What is request? You don't show us.

The deployment descriptor is not useful information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
Here is the complete script code

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

Look at line 6 very carefully.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
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

Joined: Apr 08, 2009
Posts: 298
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.
 
GeeCON Prague 2014
 
subject: Error: Object doesn't support this property or method