Current File : //home/obabain/anms_obaba_in/machineSelect.jsp
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="java.sql.*" %>
    <%@ include file="Connection.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="img/ico.ico" />
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/estilos.css" rel="stylesheet">
    <script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Product</title>
</head>
<body>
<section id="main">
			<div class="container">
			 <div class="row">
			<div class="panel panel-default">
          <div class="col-md-8">
          <br>
    <div> <label>Search Here</label>
    <input class="form-control" type="text" placeholder="Search Machine..." name="filter" id="myInput" onkeyup="myFunction()"><a></a>
    </div>      
  <br>       
          
<table class="table table-striped" id="datatable-responsive">
<thead>
<tr>
<th>Machin Id</th>
<th>Machine Name</th>

<th>Machine Capacity</th>
 <th>Manufacture Date</th> 
<th>select</th>
</tr>
</thead>

<tr>
<%
try
{
	
	Statement st=con.createStatement();
/* 	ResultSet rs=st.executeQuery("select tb.*,(select family_name from ip_families where family_id=tb.family_id)family from ip_products tb");
 */
	ResultSet rs=st.executeQuery("select * from  machin_details where id=id");
 while(rs.next())
	{%>
	<td><%=rs.getString("machin_id") %></td>
	<td><%=rs.getString("machine_name") %></td>
<%-- 	<td><%=rs.getString("family") %></td> --%>
	<td><%=rs.getString("machin_capacity") %></td>
	<td><%=rs.getString("manufacture_date") %></td>
<%-- 	<td><%=rs.getString("product_description") %></td>
	<td><%=rs.getString("product_price") %></td> --%>
	 <td><a href="#" onclick="returnYourChoice1('<%=rs.getString("machine_name") %>','<%=rs.getString("machin_capacity") %>')" ><img src="img/tick_green.png" height="32" width="32"></a></td>
	
	
</tr>
<%		
	}
}
catch(Exception el){}
%>


</table>
<input type="button" value="submit">


</div>
</div>
</div>
</div>
</section>
<script type="text/javascript">
    // return the value to the parent window
    function returnYourChoice1(choice,choice2){
        opener.setSearchRslt3(targetField,targetField1,choice,choice2);
        window.close();
    }
</script>
 <script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
function myFunction() {
  var input, filter, table, tr, td, i;
  input = document.getElementById("myInput");
  filter = input.value.toUpperCase();
  table = document.getElementById("datatable-responsive");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td = tr[i].getElementsByTagName("td")[1];
    if (td) {
      if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }       
  }
}
</script>	
</body>
</html>