Phil,
Here's an article I wrote for FoxTalk a while back - may give you some ideas.
http://www.waynemyers.com/articles/vfp_fieldval.htmWayne
>Thanks,
>Kind of obvious really wasn't it. You probably guessed I'm new to this.
>I've got a less stupid question you might be able to help me with as well.
>I've written a function to validate certain mandatory fields in a form. At the moment everybody here writes their own functions for that and other types of validation. Usually even different functions for each individual input box on the same form.
>I was wondering if anyone out there reused javascript functions in the way you would use a procedure library in other environments. I am initialy thinking along the lines of storing functions in separate files and using includes to pick appropriate ones (like the one mentioned above) and then calling the function with parameters that identify the necessary elements of the particular form. That's where the idea gets messy. Can you pass arrays as parameters?
>Is the whole idea daft?
>If not are there any recognised methodologies and what is your approach?
>
>
>Phil
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown