Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4.  
  5. <script language="javascript">
  6. function saveInfo()
  7. {
  8. var suppname = document.getElementById("suppliers");
  9. if(suppname.selectedIndex == 0)
  10. {
  11. alert("Please select the supplier.");
  12. return false;
  13. }
  14. else
  15. document.form1.action = 'modifysupplier.jsp';
  16. }
  17.  
  18. </script>
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  21. <title>Untitled Document</title>
  22. <style type="text/css">
  23. <!--
  24. body {
  25. background-image: url(images/iwt3.jpg);
  26. }
  27. -->
  28. </style></head>
  29.  
  30. <body>
  31.  
  32. <div align="center">
  33. <h2>MODIFY SUPPLIER</h2>
  34. <hr>
  35. <p>&nbsp;</p>
  36. <h3><strong>Please select the supplier from the list below.</strong></h3>
  37. <form name="form1" method="post" action="">
  38. <p>
  39. <select name="suppliers" id="suppliers">
  40. <option selected>SELECT</option>
  41. <%
  42. beans.SupplierData sdata = new beans.SupplierData();
  43.  
  44. ResultSet rs = sdata.getSuppliers();
  45. while(rs.next())
  46. {
  47. %>
  48. <option><%=rs.getString("supplier_name")%></option>
  49. <%
  50. }
  51.  
  52. %>
  53. </select>
  54. </p>
  55. <p>&nbsp;</p>
  56. <table width="152" border="0">
  57. <tr>
  58. <td width="79"><div align="center">
  59. <input type="submit" name="Submit" value=" OK " onClick="return saveInfo();">
  60. </div></td>
  61. <td width="111"><div align="center">
  62. <input type="submit" name="Submit" value="CANCEL" onClick="action = 'supplier.jsp'">
  63. </div></td>
  64. </tr>
  65. </table>
  66. <p>&nbsp; </p>
  67. </form>
  68. <p><strong></strong></p>
  69. <p>&nbsp; </p>
  70. </div>
  71. </body>
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement