• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error: Object doesn't support this property or method

 
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the complete script code

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at line 6 very carefully.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic