Home » jQuery » Search using jQuery and php

Search using jQuery and php

Software developers using

jQuery search

for various occasions. This tutorial is based on zend framework template system.
<h4 class=”search” >Search .
<table border=”0″ cellspacing=”4″>
<tr><td>Society Name</td><td width=””><input type=”text” name=”society_name” id=”society_name” style=”width: 155px”></td>
<td>Created on</td><td width=””><input type=”text” name=”added_on” id=”added_on” style=”width: 155px”>
<script type=”text/javascript”>
dateFormat: “yy/mm/dd”,
beforeShowDay: $.datepicker.noWeekends
<td width=”120″><input type=”button” id=”search-societies_0″ value=” Go ” class=”alt_btn search-societies”>
<input type=”button” id=”searchclear_0″ value=” Reset ” class=”alt_btn search-societies-clear”>
<div  id=”society-list”> </div>
//Search societies start here.
$(“.search-societies”).live(“click”, function(){
var id =$( this ).attr(“id”).split(‘_’);
var society_name = $.trim($(“#society_name”).val());
var added_on = $.trim($(“#added_on”).val());
var oSocietiessearch = new Object();
oSocietiessearch.society_name = society_name;
oSocietiessearch.added_on = added_on;
$(“#society-list”).load(sBaseUrl + “/admin/pollsocieties/societylist”, oSocietiessearch);
}); //Search societies end here.
//Search society clear
$(“.search-societies-clear”).live(“click”, function(){
var id =$( this ).attr(“id”).split(‘_’);
$(“#society-list”).load(sBaseUrl + “/admin/pollsocieties/societylist”);
}); //Search society clear ends here.


Leave a Reply


Check Also

How to Check Expired Sessions using jQuery Ajax and PHP

We can achieve using the php and ajax.The following ajax call execute in every 10 ...