Current File : //home/obabain/public_html/abc/Edit_mech_propertyview2.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"); 
     String id1=request.getParameter("mid");
     String a=request.getParameter("mproperties"); 
     String b=request.getParameter("pmin"); 
     String c=request.getParameter("pmax"); 
     String d=request.getParameter("impact"); 
     String e=request.getParameter("microstructure"); 
 session.setAttribute("sd_id",id);
    //System.out.println(id);
 %>
 
 
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body onload="loadData('<%=id1%>')" >
<%@include file="master.jsp" %>
<form action="Update_mech_propertyview2.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>
 
<div class="panel-body">



   
          
          <div class="row" style="margin-left:10px;">
           <div class="onerow"> 
            <input type="hidden" value="<%=id%>" name="id">
               
               <div class="form-group col-xs-2">         
               <p> <label for="firstname" style="margin:5px;">Properties</label></p>
                <select  name="pr"  class="select1 form-control" id="elements" style="width:180px;" >
          <option value="0">select</option>
       
	<%
        PreparedStatement pstmt=null;//create statement
        pstmt=con.prepareStatement("select * from mech_properties"); //sql select query
        rs=pstmt.executeQuery(); //execute query and set in resultset object rs.         
        while(rs.next())
        {
        %>
			<option value="<%=rs.getString("m_id")%>">
				<%=rs.getString("m_properties")%> 
            </option>
        <%
    }
    %>
          </select>  
           
               </div>
               
               <div class="form-group col-xs-2" style="margin-top:5px;">
               <p> <label for="firstname" style="margin-left:15px;">Minimum</label></p>
               <input type="text"  style="width:90px;margin-left:25px;" name="min" class="form-control" value="<%=c%>">
               
               </div> 
               <div class="form-group col-xs-2">
               <p> <label for="firstname" style="margin:5px;">Maximum</label></p>
               <input type="text"  style="width:90px;" name="max" class="form-control" value="<%=b%>">
               
               </div> 
               </div> 
               <div class="form-group col-xs-2">
               <p> <label for="firstname" style="margin:5px;">Impact</label></p>
               <input type="text"  style="width:90px;" name="imp" class="form-control" value="<%=d%>">
               
               </div>  
               <div class="form-group col-xs-2">
               <p> <label for="firstname" style="margin:5px;">Micro-Structure</label></p>
               <input type="text"  style="width:90px;" name="mi" class="form-control" value="<%=e%>">
               
               </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:#204b58;" class="pull-left btn btn-info" onclick="goBack()"/>
          <a class="btn btn-default"  href="">Reset</a>
     
        <input type="submit" style="background:#204b58;" class="btn btn-info" id="save" onclick="debitcredit();">
      </div>
</div>
</div>
</div>
</form>
<%@include file="footer.jsp" %>


</body>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
<script>
function loadData(c)
{
  document.getElementById('elements').value=c;
  
  }
</script>
</html>