Current File : /home/obabain/khb_obaba_in/PMS.jsp
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="javax.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>
$('#submit').click(function() {
    var checkedValues = $('.invid:checked').map(function() {
        return this.value;
    }).get();

    $.ajax({
        url: "PurchaseOrder.jsp",
        type: "post",
        data: $('.checkboxes:checked').serialize(),
        success: function(data) {
            $('#response').html(data);
        }
    });
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form>
<section id="main">
			<div class="container">
			 <div class="row">
			<div class="panel panel-default">
          <div class="col-md-8">
<table class="table table-striped" >
<thead>
<tr>
<td><b><u>p_id</u></b></td>
<td><b><u>P Name</u></b></td>
<td><b><u>Weight</u></b></td>
<td><b><u>Quentity</u></b></td>

</tr>
</thead>

<tr>

<%try{

Connection conn = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/erpdemo","root", "");
ResultSet rs = null;
Statement st=null;
st=conn.createStatement();
rs = st.executeQuery("select * from ip_products");
int i=0; while(rs.next()){ %>
<td><input type="checkbox" name="check[]" value="<%= rs.getString("product_id") %>"></td>
<td><input type="text" name="pid[]" value="<%= rs.getString("product_id") %>"></td>
<td><input type="text" name="pname[]" value="<%= rs.getString("product_name") %>"></td>
<td><input type="text" name="pdesc[]" value="<%=rs.getString("product_description") %>"></td>
	<td><input type="text" name="pprice[]" value="<%=rs.getString("product_price") %>"></td>
</tr>


<%
i++;
}
}catch(SQLException e){ System.out.println(e.getMessage()); } %>

</table>
<input type="submit" onclick="returnYourChoice1()">



</div>
</div>
</div>
</div>
</section>
</form>
 <script type="text/javascript">
    // return the value to the parent window
    function returnYourChoice1(){
        //opener.setSearchRslt(targetField,targetField2,targetField3,targetField4,targetField5,targetField6,choice,choice2,choice3,choice4,choice5,choice6);
        window.close();
    }
</script>
</body>
</html>