<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> <script type="text/javascript"> function newVendor(){ window.open("<%=path%>/vendor/vendorAdd.jsp","_self"); } function check(){ var Date1 = document.f.bill_date.value; var Date2 = document.f.bill_due_date.value; if(f.bill_date.value==""){ alert("Bill Date can't be null!"); return false; } if(f.bill_due_date.value==""){ alert("Bill Due Date can't be null!"); return false; } if(Date1>Date2) { alert( "Bill Date can later than the Bill Due Date "); return false; } return true; } </script> <body> <form method="POST" action="<%=path %>/Bill/" name="f"> <p align="center"><b><font color="#993333">Bill Date: <input type="text" name="bill_date" size="20">(yyyy-mm-dd)</font></b></p> <p align="center"><b><font color="#993333">Bill Due Date</font></b><font color="#993333"><b>: <input type="text" name="bill_due_date" size="20">(yyyy-mm-dd)</b></font></p> <p align="center"><font color="#993333"><b> Vendor:<select size="1" name="vendor_id_name" > <c:if test="${!empty BM}"> <c:forEach items="${BM}" var="vendor"> <option value="${vendor.vendor_id }:${vendor.vendor_name }" >${vendor.vendor_name }</option> </c:forEach> </c:if> </select> <input type="button" value="new Vendor" name="B3" οnclick="newVendor()" style="background-color: #FDCC64; color: #800000; font-weight: bold"></b></font></p> <p align="center"> <input type="submit" value="Add Department Item" name="B1" class="B1" οnclick="return check()" > <input type="reset" value="Reset" name="B2" class="B1" ></p> </form> </body>