Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
creating random numbers within a form
Old 01-13-2005, 12:35 AM creating random numbers within a form
Experienced Talker

Posts: 45
Trades: 0
I have a form that I'm working on, which you can view at:

http://www.jetclik.com/form.html


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
planeboy7e7 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-13-2005, 08:53 AM
Experienced Talker

Posts: 45
Trades: 0
also forgot to mention, once the agree button (image) is clicked, i need it to disappear.
planeboy7e7 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to creating random numbers within a form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09640 seconds with 12 queries