jstl과 javascript,jquery 결합

<script type="text/javascript">

 var arrDeptList = [
                 <c:forEach var="dataList" items="${deptPickupVOList}" varStatus="status">
                    {
                     value : "${dataList.dept_cd}",
                     label : "${dataList.dept_nm}"
                    }
                    <c:if test="${not status.last}">,</c:if>
                 </c:forEach>
 ];

 $(document).ready(function(){
  /*
   * autocomplete 부분
   */
     $("#deptselect").autocomplete({
   source: arrDeptList,
   focus: function( event, ui ) {
    $( "#deptselect" ).val( ui.item.label );
    return false;
        },
        select: function( event, ui ) {
         $( "#dept_cd" ).val( ui.item.value );
         $( "#dept_nm" ).val( ui.item.label );
         return false;
        }
  });
  });
</script>

by FreeStyle | 2010/12/03 11:40 | Jsp&Script | 트랙백 | 덧글(0)

트랙백 주소 : http://yamazsw.egloos.com/tb/2720818
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶