Display DropDownList User Selections on Screen with a Separator - append or Join?
<p>This code will display the user selections from the dropDowList on screen as they are selected.</p>

<p>Now I need to place a separator after each selection so they don't run together. I have tried the append as well as join but without success.</p>

<p>Would someone please show me how to accomplish this simple task?</p>

<pre><code>$("#ServiceRequest_select").change(function() {
    var content = $("#ServiceRequest_select option:selected").text();
    $("TD#displayitem").text(content);
});
</code></pre>

<p>UPDATE: Jquery examples that aren't working:<br>
The result of using Raminson's suggested code with <code>this</code> instead of the <code>div#</code> is that; Every item displays when a single item is selected and without seperation of items. I'm thinking it's because the jquery is in Yii's PHP. Thank you for trying Raminson.</p>

<pre><code>$("#ServiceRequest_select").change(function() { 
    var content = $(this).text(); // text of selected option
    $("#displayitem").append("&lt;span&gt;"+ content +"&lt;/span&gt;"); // appends a new span 
}); 
</code></pre>

<p>This next example, using the <code>div#</code> instead of <code>this</code> will show the selected items BUT it doesn't remove deselected items SO it adds the changed selection below previous selection.</p>

<pre><code>$("#ServiceRequest_select").change(function() { 
    var content = $("#ServiceRequest_select option:selected").text();
    $("TD#displayitem").append("&lt;span&gt;"+ content +"&lt;/span&gt;");
});
</code></pre>

<p>I have tried variations, searched for examples, but still need <strong>help to display the user selections/deselections on the page with a serparator such as <code>&lt;br /&gt;</code> as they are selected/deselected?</strong> Geez, I'm going to need brain surgery; I'm glad I'm not trying anything REALLY complex! :smile: I still think Jquery is kewl!</p>
