<!DOCTYPE html>
<html lang="en">
<head>
  <title>Edit customer detail</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="css/bootstrap.min.css">

		   <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

		 <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script src="js/bootstrap.min.js"></script>
    <script>
         $( function() {
    $( "#pkg_name" ).autocomplete({
      minLength: 2,
      source: "resources/s_pkg.php",
      focus: function( event, ui ) {
        $( "#pkg_name" ).val( ui.item.name);
		//alert(ui.item.name);
        return false;
      },
      select: function( event, ui ) {
        $( "#pkg_id" ).val( ui.item.id );
        $( "#pkg_name" ).val( ui.item.name );
        $( "#pkg_detail" ).val( ui.item.desc );
		$( "#pkg_amount" ).val( ui.item.amount );
        $( "#pkg_date" ).val( ui.item.date );
        			//showHin(ui.item.code);

       // $( "#project-icon" ).attr( "src", "images/" + ui.item.desc );
         //var ccod= ui.item.code; 
        return false;
      }
    })
    .autocomplete( "instance" )._renderItem = function( ul, item ) {
	return $( "<li>" )
        .append( "<div><b>" + item.name + "</b><br>" + item.amount + "</div>" )
        .appendTo( ul );
    };
  
		
  } );
  </script>
</head>
<body>