Yet Another Autocomplete

我要开发同款
匿名用户2008年09月19日
222阅读

技术信息

授权协议
未知

作品详情

IcreatedthisplugibecauseIwasothappywithayoftheotheroes.Thisplugiwillgiveyousimple,cleaautocompletefuctioalityotheselectedtextbox.

Here'sthecode:

HTMLFile:

<formid="myform">  <iputtype="text"ame="my_textbox"id="my_textbox"/></form><scripttype="text/javascript"><!--$(fuctio() {  vardata={     f:'lookup'  };  varoptios={     mi_legth:3,     error_resposes:[        "Noresults.",        "Toomayresults."     ]  };  $("#suggest").suggest("search.php",data,optios);});--></script>

 

Exampleserver-sidePHPscript,search.php:

<?php//Prevetcachigheader("Cache-Cotrol:o-cache,must-revalidate");  //HTTP/1.1header("Expires:Ja1,2000");  //Dateithepast$f         =$_GET['f'];$allowed_fs=array('lookup');if(!i_array($f,$allowed_fs)) {exit;}pritcall_user_fuc($f);fuctiolookup() {  $q=valueIfSet($_GET['q']);  $attrs=array("uid","giveame","s");  $filter="level03=95C";  try{     $results=your_ldap_lookup_fuctio($q,$attrs,$filter,true,,1);  }catch(Exceptio$e) {     retur"Toomayresults.";  }  if(cout($results)===) {     retur"Noresults.";  }  $list=array();  foreach($resultsas$result) {     $s =$result['s'];     $g =$result['giveame'];     $uid=$result['uid'];     $ame="$s,$g($uid)";     array_push($list,$ame);  }  returimplode("\",$list);}?>

功能介绍

I created this plugin because I was not happy with any of the other ones. This plugin will give y...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论