javascript help to create alert in script
I am very new to this and was given the task to "help". I'm at a loss! My
brain is fried.. What the script does is generates a form based on the
input given (in Internet Ex 8). The only problem I have is when a person
types into the text field, say for day of the week, if it's left blank,
misspelled, or just doesn't match the list tied to it then it will still
generate the form but that field will come out as "undefined". What they
type is tied to a list in the script that determines what the output info
is. I'm trying to figure out how to create an alert saying "Doesn't match"
or "enter info" if it doesn't match the list or is left blank. Any
starting point would be greatly appreciated!!! I've looked and tried
different validations but nothing that will tie to the list.. Sorry if the
post doesn't make sense, I've been at it for a while.
The list if that helps, again, I'm new so forgive me =)
function getDay(weekcode) {
var DayHash={
'Monday':'df',
'Tuesday':'fg',
'Wednesday':'gh',
'Thursday':'hjt',
'Friday':'jk',
'Saturday':'x3D',
'Sunday':'Crt',
No comments:
Post a Comment