Xinhao,
Welcome to the list;

The way I usually do it is something like this:

php (returns json):
echo '{id:1,fname:"Benjamin",lname:"Sterling"}';

javascript:

$.ajax({
dataType:'json',
url:'mypage.php',
success : function(info){
// do something with with "info"
// call return by doing something like
// info.id / info.fname / info.lname
}
});

This should point you in the right direction.


On 7/10/07, Xinhao Zheng <[EMAIL PROTECTED]> wrote:


hello everyone,
  I am just a fresher to jQuery.I like it very much.I need some help.

Is there any way to request a php file to fetch data from db in jQuery
then operate on it use  js?Ajax can do it?

which format would be the best way to return the data,json or xml?how to
deal with that in js?

I just want to implement a calendar and display data from db.

Thanks




--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com

Reply via email to