Figure 1


JavaScript method to verify field-value existence.


function exists(userEntry, word) {

        aCharExists=0
        
        if (userEntry) {   
             
                   for (var i=0; i<userEntry.length; i++) {
                   
                        if (userEntry.charAt(i) != " ") {
                        
                                aCharExists=1
                                
                        }
                        
                }
                
        }
        
        if (!aCharExists) {
        
                alert("Please enter a " + word)
                
        }
        
}