Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes Ajax with Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax with Database" Watch "Ajax with Database" New topic
Author

Ajax with Database

Sandy Siingh
Greenhorn

Joined: Oct 16, 2008
Posts: 5
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Oct 16, 2008
Posts: 5
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
 
Don't get me started about those stupid light bulbs.
 
subject: Ajax with Database
 
Similar Threads
call a javascript function from datepicker
Configurable Date pricker Javascript
need Date and Time Picker for my Application
Date and time picker Js file
Dispalying random dates