Current File : /home/obabain/khb_obaba_in/CustomerEdititem.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>
     
     <% 
     
     String id=request.getParameter("Id"); 
     
     String cuid=request.getParameter("clientid"); 
     String proid=request.getParameter("proid"); 
 session.setAttribute("sd_id",id);
    //System.out.println(id);
 %>
 
  <%!
 String clname=null;  %>
 
<%Statement st=con.createStatement(); 
ResultSet rs= null;
  id=request.getParameter("Id");
 rs=st.executeQuery("select * from ip_clients where client_id="+cuid+"");
 while(rs.next())
 {
 clname=rs.getString("client_name");
 }
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body onload="loadData('<%=proid%>')" >
<%@include file="master.jsp" %>
<form action="CustomerUpdateitem.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">Editing Item </h3>
       
        </div> 
</div>
 <input type="hidden" name="client" value="<%=clname%>">
                               <input type="hidden" name="clientid" value="<%=cuid%>">
<!-- <a style="background:;margin-top:-23px; " class="btn btn-success pull-right" href="">View</a> -->
<div class="panel-body">
<div class="row" style="margin-left:170px;">
<div class="form-group col-xs-3">
  <div class="onerow">
      <input type="hidden" value="<%=id%>" name="id">
               <p> <label for="firstname" style="margin:5px;">product name</label></p>
                <select  name="po"  class="select1 form-control"  id="elements"style="width:170px;" >
          <option value="0">select</option>
       
	<%
        PreparedStatement pstmt=null;//create statement
        pstmt=con.prepareStatement("select * from ip_products "); //sql select query
        rs=pstmt.executeQuery(); //execute query and set in resultset object rs.         
        while(rs.next())
        {
        %>
			<option value="<%=rs.getString("product_id")%>">
				<%=rs.getString("product_name")%> 
            </option>
        <%
    }
        
    %>
    
          </select>  
               
               </div>             
</div>
<%-- <div class="form-group col-xs-3">
               <p> <label for="firstname" style="margin:5px;">State</label></p>
               <input type="text" name="st" class="form-control" value="<%=name2%>">
               
               </div>   --%>
                    
</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>
<script>
function loadData(c)
{
  document.getElementById('elements').value=c;
  
  }
</script>
</body>
</html>