Advertisement
illpastethat

Untitled

Nov 14th, 2015
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <script type="text/javascript">
  2.         function validateForm() {
  3.             var a = document.forms["editorder"]["OrderID"].value;
  4.             var b = document.forms["editorder"]["orderdate"].value;
  5.             var c = document.forms["editorder"]["customer"].value;
  6.             var d = document.forms["editorder"]["salesagent"].value;
  7.             var e = document.forms["editorder"]["orderstatus"].value;
  8.             if (a == null || a == "" || b == null || b == "" || c == null || c == "" || d == null || d == "" || e == null || e == ""){
  9.                 alert("One or more fields have been left blank.");
  10.                 return false;
  11.             }
  12.             if(isNaN(a)){
  13.                 alert("One or more inputs require numeric input where text was used.")
  14.                 return false;
  15.             }
  16.         }
  17.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement