using validatefields.js with two forms in one website
I have two different forms on my site, both of which I would like to use the validatefields.js. It works fine on one form, but doesn't on the other and they have identical code. Do I need to name the forms differently? create a different validatefields.js file?
You should be able to use the same .js file to validate both forms. If the id's of the input elements in both forms are exactly the same then you should be able to use the same functions in your .js file to validate both forms. The names of the forms is irrelevant if you use
to get the input values from the form to validate.
If the two forms are on the same web page then the form names, id's and element names should be different. If you are using something like document.forms........ then the first form will be forms and the second form will be forms etc for mutiple forms on the one page.
If you can, post your html form codes and the relevent functions from your .js file to help make your situation clearer.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)