• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Ajax doubt

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I have a doubt in my Ajax code. I know java forum is not the place to put this, but i could not find any other suitable forums. sorry about that.

I am building a jsp-servlet application .

I have a page Inventory.jsp where in I use ajax code to load the page with data from database in a table on the load event of the body of the page.

I am unable to get the readyState ==4 in my program. Please go through the code. Kindly help me urgently...

 
Sheriff
Posts: 67682
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
The vast majority of client-side developers use jQuery to make Ajax a lot simpler and more robust. I'd suggest the same for you.
 
author
Posts: 297
5
Android Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like the listing you've provided is for the page Inventory.jsp, but you're also making an Ajax request from that page to Inventory.jsp. Yet there is no conditional logic in your listing to produce different results depending on whether it's a regular request or an Ajax request. So in this case my question would be: why are you trying to use Ajax at all? Just write the results into the page as they're generated.
 
I just had the craziest dream. This tiny ad was in it.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic