File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet and ajax

 
Kapil Sankala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how should i retain checkbox value checked while returning from servlet.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how is this related to Ajax?
 
Kapil Sankala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will elaborate my question See i am calling function written in boilerplate from jsp page which is main page of our website then in boilerplate function i am making ajax call to servlet where i am firing sql query on database and record retrived are taken in json array which are back return to boilerplate where they are accessed in success function of ajax call.Now my problem is in success function of ajax whenever data is fetched from database i should get check box checked in short adding and updating information iwant to do from same form.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So a page makes an ajax request and the response is received, but I am not sure where the problem is.
 
Kapil Sankala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is in servlet and boilerplate.In servlet when i am getting value of particular field from database if that field value is yes then returning to boilerplate where checkbox is defined should get checked
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok
 
D. Ogranos
Ranch Hand
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you just need Javascript to do that. You can probably simply set the checkbox in your success function (which is called when the Ajax call returns).
 
Kapil Sankala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your solution it works
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic