• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in servlet with Ajax

 
Ritesh raushan
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i submit request output has not come and also not give errors.



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post your code again with proper indentation. Unindented code is just too hard to read. But on an initial inspection, it does not look like you are using Ajax correctly.
 
Ayan mallick
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can check with javascript alert whether functions are being called properly.

then you can put print statement in the servlet to check whether request is coming upto servlet or not.

go step by step and check where is the problem.

I think type of http request would be "GET" not "get".
 
Petro Gordiievych
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try instead use Since as form will be submit after you click on button, because type is "submit" and don't go though fun1(). If it doesn't work may I suggest you to use jQuery instead pour JS Ajax, it can save lot of time and be crossbrowser solution. For example to your case:


Don't forgot add two JS library:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic