Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function validateForm() {
  2.     error = 0;
  3.     $('div.game').each(function() {
  4.         var substr = $(this).attr('id').split('-');
  5.         var game_id = substr[1];
  6.         var selection = $('#selection-'+game_id).val();
  7.         var points = $('#points-'+game_id).val();
  8.         if ((selection > 0) && (points == '')) {
  9.             error = 1;
  10.         }
  11.     });
  12.     if (error == 1) {
  13.         return false;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement