Posted By

manec on 11/17/08


Tagged

ajax jquery


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

jillella
natalan
umang_nine
Hollow


Jquery AJAX function


 / Published in: JavaScript
 

  1. <input class="q" type="text" id="contenido" name="contenido" onKeyUp="lookup(this.value);">
  2.  
  3. function lookup(inputString){
  4. if (inputString.lenght==0){
  5. $('#div').hide();
  6. }else{
  7. $.post("rpc_contenido.php", {queryString:""+inputString+""},function(data){
  8. if(data.lenght>4){
  9. $(#div).show();
  10. $('#div2').html(data);
  11. }else{
  12. $(?#div').hide();
  13. }
  14. });
  15. }
  16. }

Report this snippet  

You need to login to post a comment.