Trouble with Javascript. Not running in application


I’m attempting to create this live validation form with javascript to add a class depending if the forms are valid. I am trying to make the form appear like this:

I have nailed down the html and CSS but it doesn’t appear that the JS is working properly. Is it not linking properly or is there another problem? My code is here: