fixed logic to test text fields for content
deleted unnecessary commented-out code
fixed error message after alert
trying to update div error and spans