johnnyi
08-02-2006, 03:27 PM
Howdy all,
If I have two separate .js files and a particular field on a form to use as a lookup, can I dynamically state which .js file to use based on the value of that field?
I'll elaborate further. I have a particular HTML form that gets updated once per year. Enough elements change on that form to govern separate functions annualy for example, a 2005.js and a 2006.js. Can I perform a lookup on a field (say <input type="text" id="Year">) and set the page to run off of 2005.js or 2006.js accordingly?
I'd prefer to use this type of approach rather than have to maintain one single evergrowing .js file. Having one separate file per year would be much easier to maintain [for me] believe it or not.
Please let me know if you have any questions.
- I
If I have two separate .js files and a particular field on a form to use as a lookup, can I dynamically state which .js file to use based on the value of that field?
I'll elaborate further. I have a particular HTML form that gets updated once per year. Enough elements change on that form to govern separate functions annualy for example, a 2005.js and a 2006.js. Can I perform a lookup on a field (say <input type="text" id="Year">) and set the page to run off of 2005.js or 2006.js accordingly?
I'd prefer to use this type of approach rather than have to maintain one single evergrowing .js file. Having one separate file per year would be much easier to maintain [for me] believe it or not.
Please let me know if you have any questions.
- I