Validate Input Field Using Javascript Variables In Innerhtml Is Not A Function