fixed the js validation to stop the refresh on html button press - 'return validate(this)'