Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. <%--
  2. Document : moduleUploadIndex
  3. Created on : 14.des.2017, 21:27:46
  4. Author : Simen Fredriksen
  5. --%>
  6.  
  7. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  8. <%@include file="linkteacher.html" %>
  9. <!DOCTYPE html>
  10.  
  11. <html>
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  14. <title>JSP Page</title>
  15. <script>
  16. function verify()
  17. {
  18. if(document.getElementById('filename').value=="")
  19. {
  20. alert('Please select the file');
  21. return false;
  22. }
  23. else
  24. {
  25. return true;
  26. }
  27. }
  28. </script>
  29. </head>
  30. <body>
  31. <h1>Upload module</h1>
  32.  
  33. <form enctype="multipart/form-data" action="uploadModule.jsp" method="post" onsubmit="return verify()">
  34. <table border='1'>
  35. <tr>
  36. <td>
  37. <br/>
  38. Remember you can upload only MS-word, MS-Excel, txt and PDF files. max size = 15mb
  39. <br/>
  40. <br/>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td>
  45. <input type="file" name="filename" id="filename" accept=".txt, application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword" />
  46. </td>
  47.  
  48. </tr>
  49. <tr>
  50. <td>
  51. Module number: <input type="text" name="moduleid" />
  52. </td>
  53. </tr>
  54. <tr>
  55. <td>
  56. Module name: <input type="text" name="modulename" />
  57. </td>
  58. </tr>
  59.  
  60. <tr>
  61. <td>
  62. <input type="submit" value="Save File" />
  63. </td>
  64. </tr>
  65. </table>
  66. </form>
  67. <br/>
  68. <br/>
  69.  
  70. </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement