I made a simple form for learning to validate it with JavaScript and I provided the example in this Fiddle. <-- The fiddle errors on the browser, but if you cut and paste the code in notepad and save it locally it will work.
I have looked for answers online pertaining to making the code I created simpler. In the fiddle you can see that I have repeated code and I want to avoid that (DRY = Do not Repeat Yourself).'
I was thinking of putting one line like
var x = document.new_member.' + Names_of_input + '.value == "" || document.new_member.' + Names_of_input + '.value == null;
Taking that into some type of loop (like a for loop or while loop if the form expands over time). I know jQuery is probably the best solution as most js is already written, but I am doing this to learn and grow my skills.
Thank You