This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Is there a way I can pass the name of form as an argument in an function . example code is list belows
which "add_employee" is the form name
I noticed that the formName in "document.formName.fieldName" must be literately the form's name such as "<form name="formName">" to let it work.
my question is : is there away to replace the formName to an variable, so other page can use this function just simplely pass their form's name as arg in the js function.