By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

js search box for dynamic contents

P: 1
I want to know that in below code, can i create a search something like my attached image.

Expand|Select|Wrap|Line Numbers
  1.         onClick: function () {
  2.             $.ajax({
  3.                 type: 'POST',
  4.                 url: 'data.php',
  5.                 dataType: 'json',
  6.                 success: function (data) {
  7.  
  8.  
  9.  
  10.                     var res = [];
  11.                     for (var i in data) {
  12.                         var rows = data[i];
  13.  
  14.  
  15.                              res.push({ 
  16.                              event_name: rows[0],
  17.                              date: rows[1],
  18.                              venue:rows[2]
  19.  
  20.  
  21.                              });
  22.  
  23.                      }
  24.                     viewModel.dSource(res);
  25.                 }
  26.             });
  27.         }
  28.     };
Attached Images
File Type: jpg search.jpg (23.5 KB, 80 views)
Sep 15 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.