Hi guys, I am working on a distance learning system for my school, it will look like this: http://dsbc.edu/distance/biblical_intro/biblical_intro_1A.htm
User will be entering words in blanks as he listen to audio file. I have a problem finding validating script (javascript) that will check entered results.
The script should trigger when user is done filling blanks and pressed “submit” button. So far I’ve found a couple scripts that seem to be able to do that, but I don’t know how to tune them up for my specific task.
Here is what I’ve got:
f = element
if ( f.value fails ) {
alert(“Error …”)
f.focus()
return false }
that’s using regular expressions, but maybe there is another way? or how do I get this script to work.
Hi Dulcinea, thanks for your and “RadBell’s” help. How do you create an array? Could you also show me how to assign a function to each text field?
thanks.