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.
I have two fields that relate to each other. I have a drop down box that contains values of 0 thru 24, If user selects anything greater then zero, I use the following code to open up a number of text boxes ( used to enter dates ) the user requested :
In my form (jsp) I have created an empty table <table id="sQmTable" cellspacing="0" border="0" > </table> So the text boxes are created inside this table. This works just the way I want it, but how do I know when the user enters data so I can validate it ? Where would I check for this event ? Would I use "onchange" ? Etc. ?
Is it possible to add a variable like below, where my name = sqdate(variable), I know this syntax is incorrect. If this is possible what is the syntax ? Thanks again ( hopefully I used "use code tags" correctly, I tried )
Joined: Nov 08, 2001
Joe Brigs wrote:Is it possible to add a variable like below, where my name = sqdate(variable), I know this syntax is incorrect. If this is possible what is the syntax ? Thanks again ( hopefully I used "use code tags" correctly, I tried )
Why would you need that??
If you need to pass back the value you can get it with this.value.
Eric, my apologies, I don't understand how your 1st response would work. I understand how (this) works , but let me start over. I call the function to create the textboxes when (onchange) the user tells me how many text boxes he wants. I then create the textboxes. I don't want to validate what the user enters in the textboxes until he hits the submit button , so I can validate them all at once. Because I have to check for valid dates but also check for duplicates etc.
I know the name of my textboxes sqDate# ( and I know what the # should be , 1 thru something) . So I wanted to loop thru each one doing the validation and replacing the # with a valid value. Hopefully this explains my problem better. Thanks Joe