Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. <script>
  2.  
  3. function VALIDATE_SBIP()
  4. {
  5. var session_id = document.forms["RegForm"]["session_id"];
  6. var dept_id = document.forms["RegForm"]["dept_id"];
  7. var course_id = document.forms["RegForm"]["course_id"];
  8. var proj_title = document.forms["RegForm"]["proj_title"];
  9. var sv_name = document.forms["RegForm"]["sv_name"];
  10.  
  11. var abstract = document.getElementById("abstract").value;
  12. var prob_stmt = document.getElementById("prob_stmt").value;
  13. var objective = document.getElementById("objective").value;
  14.  
  15. if (session_id.value == "NULL")
  16. {
  17. window.alert("Please Select Session");
  18. session_id.focus();
  19. return false;
  20. }
  21.  
  22. if (dept_id.value == "NULL")
  23. {
  24. window.alert("Please Select Department");
  25. dept_id.focus();
  26. return false;
  27. }
  28.  
  29. if (course_id.value == "NULL")
  30. {
  31. window.alert("Please Select Course");
  32. course_id.focus();
  33. return false;
  34. }
  35.  
  36. if (proj_title.value == "")
  37. {
  38. window.alert("Please Fill Project Name");
  39. proj_title.focus();
  40. return false;
  41. }
  42.  
  43. if (sv_name.value == "NULL")
  44. {
  45. window.alert("Please Select Supervisor");
  46. sv_name.focus();
  47. return false;
  48. }
  49.  
  50. if(abstract=="<br>" || abstract=="")
  51. {
  52. window.alert("Please Fill Abstract");
  53. document.getElementById("abstract").focus();
  54. return false;
  55. }
  56.  
  57. if(prob_stmt=="<br>" || prob_stmt=="")
  58. {
  59. window.alert("Please Fill Problem Statement");
  60. document.getElementById("prob_stmt").focus();
  61. return false;
  62. }
  63.  
  64. if(objective=="<br>" || objective=="")
  65. {
  66. window.alert("Please Fill Objective");
  67. document.getElementById("objective").focus();
  68. return false;
  69. }
  70.  
  71. return true;
  72. }
  73. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement