planeboy747
Technical User
I have a form that I'm working on, which you can view at:
I have only a part of this form functional with the JavaScript I already have. At the top of the form there is a place to enter the number of customers. Once you select that number, it autopopulates the "Customer Names" section (id="nameSet) with the appropriate number of fields.
The next section is Terms of Contract, which has an image button labeled id="agreeButton". I would like once someone clicks this button for it to show the Authorization Code and the Order Numbers tables below, as you currently see on the form. I don't want those to sections to initially show up when the form loads. I would like those to only load when the agree button is clicked.
In the Authorization Code section, I have a hidden field labeled id="code". I would like for JavaScript to fill that hidden field with a random four digit alpha numeric number that starts with the number 4 (the other 3 characters are random alpha/numeric). The characters i,o,1,0 need to be excluded from the random selection process. In addition, you'll see where I've listed just a sample Authorization Code in bold of 4ZXY (just for display purposes), just to show how it should be presented in the text. I'm thinking if a document.write could read the id="code" and then populate this section of the form with that code.
For the Order Numbers Section, I would like these fields to automatically populate based on the number entered into the id="nameSet" (Number of customers field). This section, like the Authorization Code section, needs to show up with the Authorization Code section, only when the Agree button has been clicked. All the order numbers start with 332, so that's why I have the number 332 before the form field, and it needs to stay that way, because since that's a constant, I never need to see those numbers entered into the field.
Okay, so the bottom line question is how to I get the code to this? LOL. I'm still new to JS, so speak slow.(smile) And if you can show me, that would be wonderful!
Well I can't wait to hear you guys feedback on this one! Thanks for your help, you guys are always so awesome!
J
I have only a part of this form functional with the JavaScript I already have. At the top of the form there is a place to enter the number of customers. Once you select that number, it autopopulates the "Customer Names" section (id="nameSet) with the appropriate number of fields.
The next section is Terms of Contract, which has an image button labeled id="agreeButton". I would like once someone clicks this button for it to show the Authorization Code and the Order Numbers tables below, as you currently see on the form. I don't want those to sections to initially show up when the form loads. I would like those to only load when the agree button is clicked.
In the Authorization Code section, I have a hidden field labeled id="code". I would like for JavaScript to fill that hidden field with a random four digit alpha numeric number that starts with the number 4 (the other 3 characters are random alpha/numeric). The characters i,o,1,0 need to be excluded from the random selection process. In addition, you'll see where I've listed just a sample Authorization Code in bold of 4ZXY (just for display purposes), just to show how it should be presented in the text. I'm thinking if a document.write could read the id="code" and then populate this section of the form with that code.
For the Order Numbers Section, I would like these fields to automatically populate based on the number entered into the id="nameSet" (Number of customers field). This section, like the Authorization Code section, needs to show up with the Authorization Code section, only when the Agree button has been clicked. All the order numbers start with 332, so that's why I have the number 332 before the form field, and it needs to stay that way, because since that's a constant, I never need to see those numbers entered into the field.
Okay, so the bottom line question is how to I get the code to this? LOL. I'm still new to JS, so speak slow.(smile) And if you can show me, that would be wonderful!
Well I can't wait to hear you guys feedback on this one! Thanks for your help, you guys are always so awesome!
J