Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

problem in passing form params in ajax call to a servlet

Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Experts .. ! I'm facing to send login params to a servlet using ajax call....

my code is listed below ....

sorry in advance for any stuppidity... actually i'm new to ajax..

so please guide some trics related to this problem....




When I make request then servlet does,t accept any request args.... I know that I'm doing something wrong... please correct my approach...
Posts: 297
Android Firefox Browser Fedora
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're not sending any request args, why are you expecting to receive any? If you want to do a POST of form data with AJAX then there's a lot of work to be done. Often easier to append the variables to the query string in a GET request, or just use a library which handles the details for you like jQuery.
Bhavesh Sangwan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ! Problem again...

Actually when I send ajax request without params ,, then it is working fine...

but when I send some request with params then no data is sent to servlet and either no response is generated by the ajax response....

why please explain....

code is here.....

ajax code...

in above ajax code, params is javascript variable in string which i'm trying to send to the server.... but not sent and nor response is coming from servlet..

what to do....

Html file...

Always look on the bright side of life. At least this ad is really tiny:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic