It might not be possible but I think its worth a shot so I am asking.
Servlet API is basically a ticketing process/script which searches through a form to find form fields that it recognizes, it has a list of names and those names are the only form fields开发者_开发百科 it recognizes, anything else it wont pick up when creating a ticket.
I am sure everyone knows of the property "NAME" in html that all elements have.
So basically this ticketing process has a list of "NAMES" that it searches for in a form and ALL the form fields that have a "NAME" from the Servlet API's list of "NAMES" it will pick and fill out a ticket..
So for example. http://jsfiddle.net/KWetJ/ over here there is a textbox named "priority"
Below is the list of "NAMES" the Servlet API has. It will search through the form and since one of the NAMES in the form matches its Servlet API name list, it will pick that up and add it to a ticket.
The priority form field is picked up as it matches a name in the Servlet API list and creates the ticket with priority that was chosen in the form and picked up by Servlet API.
NOW THE PROBLEM: as some might have guessed I cannot create additional or custom form field names because I cannot add new names into the Servlet API list. So What I was thinking if possible is to add a drop down list in to the Description section of the form and so in a way I can start adding textboxes and drop downs into that textarea for description.
Goal is this:
A POSSIBLE SOLUTION OR ALTERNATE, How would I do this?
![Alternative Or Possible Solution with AJAX][4]![Alternative Or Possible Solution with AJAX][4]
Try this on for size: http://jsfiddle.net/maniator/Ke5dy/
$('#addText').change(function(){
$('#myText').append(this.value);
});
HTML:
<select id='addText'>
<option value='hello'>hello</option>
<option value='hi'>hi</option>
<option value='hola'>hola</option>
<option value='shalom'>shalom</option>
</select>
<textarea id='myText'></textarea>
A textarea can only ever have text in it. HTML form field tags within a textarea won't be rendered as input elements. If you want embedded HTML elements within text and have them rendered as input elements, you'll need to use something like CKeditor.
精彩评论