• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to retrive data from database using Ajax without submit

 
R Sugan
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Ajax.I need how to retrive data from database using ajax.Is it possible to get the data from database .Please give me any sample code.






Regards,
Suganya.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Ajax part only handles the client side. Most client-side JS libraries you're likely to be using have Ajax support built in; how you handle DB access depends on your back-end.
 
R Sugan
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


Thanks David Newton.



Regards,
Suganya.
 
R Sugan
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
I am using java servlet program in that i have include ajax program.Main purpose for using ajax program is to refresh servlet program automatically.If any value changes in database it should get the value and redirect to next page.whether it is possible to do without submit button.

Regards,
Suganya.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can trigger an Ajax call on any event that occurs on the client. What you cannot do is to cause something to happen from the server when a value in the database changes. The activity needs to be initiated on the client.

Rather than positing a solution, why don't you explain what you are actually trying to accomplish?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic