$(document).ready(function(){
$("#searchButton").click(function(e) {
look();
e.preventDefault();
});
});
function look()
{
hideshow("loading",1);
var search = $("#search").val();
var dataString = 'search='+ search;
$.ajax({
type: "GET",
url: "content.php",
data: dataString,
timeout: "10000",
success: function(server_response){
$("#maincontent").html(server_response).show();
$("#maincontent").css("background-image","none");
hideshow("loading",0);
}
});
}
function hideshow(el,act)
{
if(act) $("#"+el).css("visibility","visible");
else $("#"+el).css("visibility","hidden");
}
the script supposed to return the respons from content.php into #maincontent

New Topic/Question
Reply


MultiQuote



|