Current File : /home/obabain/public_html/abc/technical_spe.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ include file="Connection.jsp" %>
            <%@page import="java.sql.ResultSet"%>
            <%@page import="java.sql.*,java.util.*"%>
             <%! String ab=null; %>
            <%
             Statement st=con.createStatement();
             String id=request.getParameter("id"); 
             String p_id=request.getParameter("p_id");
             String c_id=request.getParameter("c_id");
             System.out.println(p_id);
             System.out.println(c_id);
             ResultSet rs=st.executeQuery("select * from ip_products  where product_id="+p_id+"");
             while(rs.next())
             {
             ab=rs.getString("product_name");	
             }
            
            %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 

    
    <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">  
    
        
 <title>Insert title here</title>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>  
<style>
/* body {font-family: Arial, Helvetica, sans-serif;} */

/* The Modal (background) */
.modal {
    display:none; /* Hidden by default */
    position: static; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top:10opx; /* Location of the box */
    left: 100px;
    top: 100px;
    bottom:100px;
    right:120px;
    width: 120%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 100%;
}

/* The Close Button */
.close {
    color:red;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color:blue;
    text-decoration: none;
    cursor: pointer;
}
</style>


</head>
<%@include file="master.jsp" %>

<style>
 table {
    border-collapse: collapse;
    border-spacing: ;
    width: 80%;
    border: 1px solid #ddd;
} 

th,td {
    text-align: left;
    padding: 16px;
} 

/* tr:nth-child(even) {
    background-color: #f2f2f2
}
 */
.rrow {
   display:inline-block;
    clear: both;     
} 

.center {
    margin: auto;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
} 

.hideform
 {
     display:none;  
 }  
 
</style> 

<body>

<script>
// JavaScript popup window function
	function basicPopup(url) {
popupWindow = window.open(url,'popUpWindow','height=300,width=700,left=50,top=50,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes')
	}

</script>
       <div class="row">
          <div class="col-md-9">
            <!-- Vista r�pida del sitio -->
            <div class="panel panel-default">
              <div class="panel-heading main-color-bg">
                 <!--   <h3 class="panel-title">Elements</h3> -->
                   <a href="create_elements.jsp"><button type="button" class="btn btn-primary" style="margin-left:840px;">Create Chemicals</button> </a>
              </div>
              
        <div class="panel-body">   
               <a href="tech_view.jsp?c_id=<%=c_id%>">  <input type="button" class="btn btn-primary" style="margin-left:880px;" value="View"> </a> 
<br><br>

    <form action="tech_action.jsp?p_id=<%=p_id%>&&c_id=<%=c_id%>&&id=<%=id%>" method="post"> 
 <table class="table table-bordered">            
  <thead>
  <tr>
      <th rowspan="2">Element</th>
       <th>Composition,%</th>
 </tr>
 <tr>   
       <th><%=ab %> </th>
 </tr>
           
        <%
       try
       {
       /*  st=con.createStatement();  */
        rs = st.executeQuery("select * from elements");  
        while(rs.next())
        {
      %>          
<tr>
       <td> <input type="text" value="<%=rs.getString("Element")%>"  name=elements[]> MAX </td>
       <td>  <input type="text" name=composition[]> </td>  
</tr>

       <%
        }

       } 
       catch (Exception e) 
       {
        e.printStackTrace();
       } 
    %>

</table>

          <div>
             <button onclick="goBack()" type="button" class="btn btn-primary">Back</button> 
             <input type="submit" class="btn btn-primary" style="margin-left:380px;">
          
          </div>   
 </form>            
          
             
             
           
<!--  <div style="margin-left:10px;">
          <button onclick="goBack()" type="button" class="btn btn-primary">Back</button>         
 </div>  -->

<script>
function goBack() {
    window.history.back();
}
</script>


   <script>
// JavaScript popup window function
	function basicPopup(url) {
popupWindow = window.open(url,'popUpWindow','height=300,width=700,left=50,top=50,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes')
	}

</script>
<!-- <a href="Foundary.jsp" onclick="basicPopup(this.href);return false">Open a popup window</a> 
 -->  
 
   
   
   
             </div>
              
         </div> 
      </div>
   </div>
    <script src="assets/libs/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap tether Core JavaScript -->
    <script src="assets/libs/popper.js/dist/umd/popper.min.js"></script>
    <script src="assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- slimscrollbar scrollbar JavaScript -->
    <script src="assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
    <script src="assets/extra-libs/sparkline/sparkline.js"></script>
    <!-- Wave Effects -->
    <script src="dist/js/waves.js"></script>
    <!-- Menu sidebar -->
    <script src="dist/js/sidebarmenu.js"></script>
    <!-- Custom JavaScript -->
    <script src="dist/js/custom.min.js"></script>
   <!--  this page js -->
    <script src="assets/libs/jquery-steps/build/jquery.steps.min.js"></script>
    <script src="assets/libs/jquery-validation/dist/jquery.validate.min.js"></script>
    <script>
        // Basic Example with form
    var form = $("#example-form");
    form.validate({
        errorPlacement: function errorPlacement(error, element) { element.before(error); },
        rules: {
            confirm: {
                equalTo: "#password"
            }
        }
    });
     form.children("div").steps({
        headerTag: "h3",
        bodyTag: "section",
        transitionEffect: "slideLeft",
        onStepChanging: function(event, currentIndex, newIndex) {
            form.validate().settings.ignore = ":disabled,:hidden";
            return form.valid();
        },
        onFinishing: function(event, currentIndex) {
            form.validate().settings.ignore = ":disabled";
            return form.valid();
        },
        onFinished: function(event, currentIndex) {
            alert("Submitted!");
        }
    });
 </script> 
 
 
 <script type="text/javascript">
$('#show').on('click', function () {
    $('.center').show();
    $(this).hide();
})

$('#close').on('click', function () {
    $('.center').hide();
    $('#show').show();
})
</script>  

 <script type="text/javascript">
function validate()
{
	 
	 // var t2=document.po.expdate.value;
	  var t3=document.getElementById("sqno").value;
	 var t1=document.getElementById("datetimepicker").value;
	  var t4=document.getElementById("datetimepickerex").value;
	  
	  
	  if( t1==null || t1=="" || t4==null || t4=="" ||  t3==null || t3=="" )
		  
		 alert('Fill all mandatory fields');
		  
}
</script>

   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"> </script> 
   <!--  Include all compiled plugins (below), or include individual files as needed -->
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></script> 
     <script src="js/select2.min.js"></script>
     <script src="js/jquery.datetimepicker.full.js"></script> 
   
    <script>
      $('select').select2();
    </script> 
    
   <script>
     jQuery('#datetimepicker').datetimepicker({
    	 timepicker:false,
    	 todayBtn: "linked"
    	 //mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
    	});
     jQuery('#datetimepicker2').datetimepicker({
    	 timepicker:false,
    	 todayBtn: "linked"
    	 //mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
    	});
 </script> 
  <script>
// Get the modal
var modal = document.getElementById('myModal');

// Get the button that opens the modal
var btn = document.getElementById("myBtn");

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks the button, open the modal 
btn.onclick = function() {
    modal.style.display = "block";
}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = "none";
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}
</script>
    
<script type="text/javascript">
 function goBack() 
   {
    window.history.back();  
   };
</script>      
        
        
</body>
</html>