Current File : //home/obabain/public_html/abc/Pouring_Edit.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>
     
     <%ResultSet rs=null;

     String id=request.getParameter("Id");
   
     System.out.println(id);
    
     %>
     
   <%!
    
     String pname1=null; 
     String haeatno=null; 
     String casting=null; 
     String pqtyno=null; 
     String pqtywt=null; 
     String rqtyno=null; 
     String rqtywt=null; 
     String tqtyno=null; 
     String tqtywt=null; 
     String remarks=null; 
     String temp=null; 
 
     %>
       
       
       <%
     Statement st=con.createStatement(); 
     ResultSet rsitem=null;
    
    
   rsitem=st.executeQuery("select tb.*,(select casting from moulding1 where m_id=tb.m_id)casting1,(select temp from moulding1 where m_id=tb.m_id)temper from pouring1 tb where p_id='"+id+"'"); 
    /*  rsitem=st.executeQuery("SELECT * FROM pouring1 p INNER JOIN  moulding1 m on p.m_id=m.m_id where p.p_id='"+id+"'"); */
     while(rsitem.next())
     {
    	 pname1=rsitem.getString("item_name");
    	 haeatno=rsitem.getString("heat_no");
    	 casting=rsitem.getString("casting1"); 
    	 pqtyno=rsitem.getString("p_qtyno");
    	 pqtywt=rsitem.getString("p_qtywt");
    	 rqtyno=rsitem.getString("r_qtyno");
    	 rqtywt=rsitem.getString("r_qtywt");
    	 tqtyno=rsitem.getString("t_qtyno");
    	 tqtywt=rsitem.getString("t_qtywt");
    	 remarks=rsitem.getString("remarks");
 	     temp=rsitem.getString("temper"); 
    	 System.out.println(casting);
    	 System.out.println(temp);
     }
     %>
   
     <!DOCTYPE html>
     <html>
<head>

     <meta charset="ISO-8859-1">
     <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"  rel="stylesheet">
     <link href="css/select2.min.css" rel="stylesheet">
     <link href="css/jquery.datetimepicker.css" rel="stylesheet">
     <script type="text/javascript"> window.onload = alertName; </script> 
     <title>Insert title here</title>
     <script type="text/javascript">
                   window.onload = function(){
                   document.getElementById('id').onclick = function(e){
                   alert(document.getElementById("id").value);
             return false;
        }
     }
     </script> 
</head>
     
     
     
 <body>
<%@include file="master.jsp" %>
      <form action="Pouring_Update.jsp" method="post">

           <div class="content">
          <div class="row">
          <div class="col-md-9" style="background-color:white;">
          <div class="panel panel-default" >
         <div class="panel-heading main-color-bg">
         <h3 class="panel-title">Pouring&nbsp;Moulding--Edit </h3>
           
           
         </div> 
        </div>


<div class="panel-body">
<div class="row" style="margin-left:60px;">

 
 <div class="form-group col-xs-3">
  
 <input type="hidden" value="<%=id%>" name="id">
               <p> <label for="firstname" style="margin:5px;">Casting</label></p>
               <input type="text" name="cast" class="form-control"  value="<%=casting%>" readonly>
               
 </div>    

  <div class="form-group col-xs-3">
               <p> <label for="firstname" style="margin:5px;">Heat NO</label></p>
               <input type="text" name="heatno" class="form-control"   value="<%=haeatno%>" readonly>             
  </div>
               
  <div class="form-group col-xs-3">
               <p> <label for="firstname" style="margin:5px;">Temperature</label></p>
               <input type="text" name="tempe" class="form-control"  value="<%=temp%>" readonly>     
  </div>
               
  <div class="form-group col-xs-3">
               <p> <label for="firstname" style="margin:5px;">Item Description</label></p>
               <input type="text" name="itemdes" class="form-control"   value="<%=pname1%>" readonly>          
  </div>
              
                
    <table  class="table table-bordered" style="width:900px;margin-right:10px;">
<tr>
<th>Poured&nbsp;Qty&nbsp;in&nbsp;No's</th>
        <th>Poured&nbsp;Qty&nbsp;in&nbsp;Kg's</th>
        <th>Rej&nbsp;Qty(No's)</th>
        <th>Rej&nbsp;Weight(Kg)</th>
        <th>Total&nbsp;Qty(No)</th>
        <th>Total&nbsp;Weight(Kg)</th>
        <th>Remarks</th>
        
  
</tr>
<tbody>

<tr>

<td>
<input type="text" name="p_qtyno" class="txtstyle"  value="<%=pqtyno%>" >
</td>

<td>
<input type="text" name="p_qtywt" class="txtstyle"  value="<%=pqtywt%>">
</td> 

<td>
<input type="text" name="r_qtyno" class="txtstyle"   value="<%=rqtyno%>" >
</td> 

 <td>
<input type="text" name="r_qtywt" class="qty txtstyle" value="<%=rqtywt%>">
</td>

<td>
<input type="text" name="t_qtyno" class="wgt txtstyle" value="<%=tqtyno%>">
</td>

<td>
<input type="text" name="t_qtywt" class="price txtstyle"  value="<%=tqtywt%>" >
</td>

<td>
<input type="text" name="remarks" class="price txtstyle"  value="<%=remarks%>">
</td>

</tr>
</tbody>
</table>
     

      </div>
</div>               

<div class="modal-footer" id="contact_submit">

         <input type="button" value="Back" style="background:#489ee7;" class="pull-left btn btn-info" onclick="goBack()"/>
          <a class="btn btn-default"  href="">Reset</a>
     
        <input type="submit" style="background:#489ee7;" class="btn btn-info" id="save" onclick="debitcredit();">
      </div>
</div>
</div>
</div>
</form>
<%@include file="footer.jsp" %>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>


</body>
</html>