Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ajax with Database

 
Sandy Siingh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am new to ajax and only knows the basics of Ajax.In my application, 1 date picker button is there i.e To date . (From date is fixed one for example 12/04/2004).My requirement is when user clicks on the To date picker (for example 01/01/2009), i have to show all the records between the to and from date by using AJAX.Please suggest me on this or if possible send me the code link where data represantation be there on clicking of date picker.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Use Javascript to invoke an asynchronous request to the server which is running some server side code (PHP? Java Servlet? etc).
2) Let the server side code get the results from the database and return it as an XML or JSON response.
3) Use Javascript to process the results into the HTML DOM tree.

That's roughly the principe of Ajax.
 
Sandy Siingh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bauke Scholtz wrote:1) Use Javascript to invoke an asynchronous request to the server which is running some server side code (PHP? Java Servlet? etc).
2) Let the server side code get the results from the database and return it as an XML or JSON response.
3) Use Javascript to process the results into the HTML DOM tree.

That's roughly the principe of Ajax.



Please send me few example code links
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you done a basic tutorial on Ajax to make a call to the server and get content? If not do something with this: http://developer.apple.com/internet/webcontent/xmlhttpreq.html

After you figured out how to make an Ajax call, figure out how your calendar works if you have one. Does it fire some sort of notification when a date is picked? Without code, we can not really help here.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic