Sunday, 15 September 2013

Js search for dynamic contents

Js search for dynamic contents

I have a js function like below, Which load date from mysql database, The
"date" result is some thing like this "2013-11-09", I want to keep a
search box for this like Month:jan, feb, etc... Year:2013,2014 etc... both
are drop down list. then a go button, And when select a specific month and
specific year, it should display only that particular month and year
events . How can i do this. Thanks in Advance.
onClick: function () {
$.ajax({
type: 'POST',
url: 'data.php',
dataType: 'json',
success: function (data) {
var res = [];
for (var i in data) {
var rows = data[i];
res.push({
event_name: rows[0],
date: rows[1],
venue:rows[2]
});
}
viewModel.dSource(res);
}
});
}
};

No comments:

Post a Comment