473,320 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Javascript Form - Gathering/consolidating field input issue

In this emal form, I'm trying to consolidate all the input into the TEXTAREA portion and then have it emailed to a specific person. I've tried the onClick and onBlur commands but only one field's input shows at a given time in the TEXTAREA box. Then, then when I move to the next field and input text, it just erases the choice from the first field in the TEXTAREA box below.

Basically, I want the data to consolidate in the TEXTAREA box and then when I click Submit, it will be emailed to me. The text should look like this in the TEXTAREA box and in the final email body:

Bob Smith
bob.smith@company.com
USA
Foxtrot, Samba


Thanks everyone,
Joe


Here is the code:

Expand|Select|Wrap|Line Numbers
  1. <form enctype="application/x-www-form-urlencoded" name="mailform" action="%SCRIPTURL{sendemail}%/%WEB%/%TOPIC%" method="POST">
  2.  
  3. <h1><a name="Registration"></a> Dance Class Registration </h1>
  4.  
  5. <table border="0" cellpadding="0" cellspacing="12">
  6.  
  7. <td></td>
  8.   <td>Fields marked <code><font color='red'>**</font></code> are required</td>
  9. </tr>
  10.  
  11. <tr>
  12.   <td align="right"> Name: </td>
  13.   <td><input type="text" name="Name" size="40" class="twikiInputField" value="" /><code><font color="red">**</font></code> </td>
  14. </tr>
  15.  
  16. <tr>
  17.   <td align="right"> E-mail address: </td>
  18.   <td><input type="text" name="Email" size="40" class="twikiInputField" value="" /> <code><font color="red">**</font></code> </td>
  19. </tr>
  20.  
  21. </tr><tr>
  22.   <td align="right"> Country: </td>
  23.   <td>
  24.   <select name="Country" size="1" />
  25.   <option selected value="">Select...</option>
  26.   <option>USA</option>
  27.   <option>Albania</option>
  28.   <option>Algeria</option>
  29.   <option>Andorra</option>
  30.   <option>Angola</option>
  31.   <option>Argentina</option>
  32.   <option>Armenia</option>
  33.   <option>Aruba</option>
  34.   <option>Australia</option>
  35.   <option>Austria</option>
  36.   <option>Azerbaijan</option>
  37.   <option>Bahrain</option>
  38.   <option>Bangladesh</option>
  39.   <option>Belarus</option>
  40.   <option>Belgium</option>
  41.   <option>Belize</option>
  42.   <option>Benin</option>
  43.   <option>Bhutan</option>
  44.   <option>Bolivia</option>
  45.   <option>Bosnia and Hercegovina</option>
  46.   <option>Brazil</option>
  47.   <option>Bulgaria</option>
  48.   <option>Burundi</option>
  49.   <option>Cambodia</option>
  50.   <option>Cameroon</option>
  51.   <option>Canada</option>
  52.   <option>Central African Republic</option>
  53.   <option>Chile</option>
  54.   <option>China</option>
  55.   <option>Colombia</option>
  56.   <option>Congo</option>
  57.   <option>Costa Rica</option>
  58.   <option>Croatia</option>
  59.   <option>Cuba</option>
  60.   <option>Cyprus</option>
  61.   <option>Czech Republic</option>
  62.   <option>Denmark</option>
  63.   <option>Ecuador</option>
  64.   <option>Egypt</option>
  65.   <option>El Salvador</option>
  66.   <option>Estonia</option>
  67.   <option>Ethiopia</option>
  68.   <option>Fiji</option>
  69.   <option>Finland</option>
  70.   <option>France</option>
  71.   <option>Georgia</option>
  72.   <option>Germany</option>
  73.   <option>Gibraltar</option>
  74.   <option>Greece</option>
  75.   <option>Guam</option>
  76.   <option>Guatemala</option>
  77.   <option>Haiti</option>
  78.   <option>Hong Kong</option>
  79.   <option>Hungary</option>
  80.   <option>Iceland</option>
  81.   <option>India</option>
  82.   <option>Indonesia</option>
  83.   <option>Iran</option>
  84.   <option>Iraq</option>
  85.   <option>Ireland</option>
  86.   <option>Israel</option>
  87.   <option>Italy</option>
  88.   <option>Jamaica</option>
  89.   <option>Japan</option>
  90.   <option>Jordan</option>
  91.   <option>Kazakstan</option>
  92.   <option>Kenya</option>
  93.   <option>Korea</option>
  94.   <option>Kuwait</option>
  95.   <option>Kyrgyz Rebublic</option>
  96.   <option>Laos</option>
  97.   <option>Latvia</option>
  98.   <option>Lebanon</option>
  99.   <option>Liberia</option>
  100.   <option>Liechtenstein</option>
  101.   <option>Lithuania</option>
  102.   <option>Luxembourg</option>
  103.   <option>Libya</option>
  104.   <option>Macao</option>
  105.   <option>Macedonia</option>
  106.   <option>Malaysia</option>
  107.   <option>Malawi</option>
  108.   <option>Malta</option>
  109.   <option>Mauritius</option>
  110.   <option>Mexico</option>
  111.   <option>Moldova</option>
  112.   <option>Monaco</option>
  113.   <option>Morocco</option>
  114.   <option>Mozambique</option>
  115.   <option>Namibia</option>
  116.   <option>Nepal</option>
  117.   <option>Netherlands</option>
  118.   <option>New Zealand</option>
  119.   <option>Nicaragua</option>
  120.   <option>Nigeria</option>
  121.   <option>Norway</option>
  122.   <option>Oman</option>
  123.   <option>Pakistan</option>
  124.   <option>Panama</option>
  125.   <option>Paraguay</option>
  126.   <option>Peru</option>
  127.   <option>Philippines</option>
  128.   <option>Poland</option>
  129.   <option>Portugal</option>
  130.   <option>Romania</option>
  131.   <option>Russia</option>
  132.   <option>Saudi Arabia</option>
  133.   <option>Senegal</option>
  134.   <option>Singapore</option>
  135.   <option>Slovakia</option>
  136.   <option>Slovenia</option>
  137.   <option>South Africa</option>
  138.   <option>Spain</option>
  139.   <option>Sri Lanka</option>
  140.   <option>Suriname</option>
  141.   <option>Sweden</option>
  142.   <option>Switzerland</option>
  143.   <option>Syria</option>
  144.   <option>Taiwan</option>
  145.   <option>Tanzania</option>
  146.   <option>Thailand</option>
  147.   <option>Tajikistan</option>
  148.   <option>Tunisia</option>
  149.   <option>Turkey</option>
  150.   <option>Turkmenistan</option>
  151.   <option>Uganda</option>
  152.   <option>Ukraine</option>
  153.   <option>United Arab Emirates</option>
  154.   <option>United Kingdom</option>
  155.   <option>Uruguay</option>
  156.   <option>USA</option>
  157.   <option>Uzbekistan</option>
  158.   <option>Vatican City</option>
  159.   <option>Venezuela</option>
  160.   <option>Vietnam</option>
  161.   <option>Yemen</option>
  162.   <option>Yugoslavia</option>
  163.   <option>Zaire</option>
  164.   <option>Zambia</option>
  165.   <option>Zimbabwe</option>
  166.   <option value="Other Country">Other Country</option>
  167.   </select> <code><font color="red">**</font></code>
  168.   </td>
  169. </tr>
  170.  
  171. </tr><tr>
  172.   <td align="right"> Type of Dance: </td>
  173.   <td>
  174.   <Input type=radio class="twikiInputField" name="class1" value="Foxtrot" />Foxtrot
  175.   <Input type=radio class="twikiInputField" name="class2" value="Mambo" />Mambo
  176.   <Input type=radio class="twikiInputField" name="class3" value="Samba" />Samba
  177.   <Input type=radio class="twikiInputField" name="class4" value="Swing" />Swing
  178.   <Input type=radio class="twikiInputField" name="class5" value="Waltz" />Waltz
  179.   <Input type=radio class="twikiInputField" name="class6" value="Other">Other Dance (indicate in the Message section below)
  180.   </td>
  181. </tr>
  182.  
  183. <p><input type=hidden input class="twikiInputField" id="to" name="to" size="30" type="text" value="xxxxx@xxxxxxx.com" /></p>
  184.  
  185. <p><input type=hidden class="twikiInputField" id="subject" name="subject" size="30" value="Dance Class Registration" /></p>
  186.  
  187. <tr>
  188.   <td valign="top" align="right"> CC: (optional)<br /> </td>
  189.   <td><input type="text" class="twikiInputField" id="cc" name="cc" size="40"  value="" /></td>
  190. </tr>
  191.  
  192. <tr>
  193.   <td valign="top" align="right"> Message: <br /> </td>
  194.   <td><textarea class="twikiInputField" cols="40" name="body" rows="6" ></textarea></td>
  195. </tr>
  196.  
  197. </table>
  198.  
  199. <h5><a name="Check"></a> Verify that the information above is correct and click below to register. </h5>
  200.  
  201. <p><input type="submit" class="twikiSubmit" value="Register" %IF{"context SendEmailPluginEnabled" then='' else='disabled="disabled"'}% /></p>
  202.  
  203. %SENDEMAIL{feedbackSuccess="Successfully sent" feedbackError="Something went wrong." }%
  204.  
  205. </form>
Oct 10 '07 #1
1 1612
acoder
16,027 Expert Mod 8TB
You need to add to the textarea value rather than reset the value. You could use +=. For the newline, use "\n".
Oct 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Simon | last post by:
Hey folks, I need some of your expertiese again. I am creating a survey form and need some help gathering the results of a question that has checkboxes. There are four options for one of the...
7
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) ...
4
by: Don W. | last post by:
Is it possible to open a browser window from a javascript for the purpose of gathering user input on a form and then use data from the form in the javascript? How do you get the data from the form...
4
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
4
by: Steph | last post by:
Hello, Can someone tell me the script to use for having a change on the same page when using checkbox function ? For example, i would to check one condition and display dynamically a button...
1
by: Nigel | last post by:
Hello, I am creating a Perl CGI page with Javascript which I believe has a problem with the javascript. Below is my form which has two submit buttons with two different actions. I am having...
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
8
numberwhun
by: numberwhun | last post by:
Hello everyone! I am dabbling in processing forms using Perl and having only just begun, I am already having problems. Go figure. :-) Top begin with, here it the form's html, its nothing at...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.