Return to Snippet

Revision: 9676
at March 5, 2009 04:27 by manec


Updated Code
<input class="q" type="text" id="contenido" name="contenido" onKeyUp="lookup(this.value);">

function lookup(inputString){
if (inputString.lenght==0){
$('#div').hide();
}else{
$.post("rpc_contenido.php", {queryString:""+inputString+""},function(data){
if(data.lenght>4){
$(#div).show();
$('#div2').html(data);
}else{
$(?#div').hide();
}
});
}
}

Revision: 9675
at November 17, 2008 10:47 by manec


Initial Code
<input class="q" type="text" id="contenido" name="contenido" onKeyUp="lookup(this.value);">

function lookup(inputString){
if (inputString.lenght==0){
$('#div').hide();
}else{
$.post("rpc_contenido.php",(queryString:""+inputString+""),function(data){
if(data.lenght>4){
$(#div).show();
$('#div2').html(data);
}else{
$(?#div').hide();
}
});
}
}

Initial URL

                                

Initial Description

                                

Initial Title
Jquery AJAX function

Initial Tags
ajax, jquery

Initial Language
JavaScript