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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement