HTML
<select name="value" id="value" class="inputbox" size="1">
<option value=""> - Select Value- </option>
<option value="red">lamp1</option>
<option value="orange">lamp2</option>
<option value="green">lamp3</option>
</select>
<div id="valuePreview">displays value here</div>
JQuery
$(document).ready(function () {
$("#value").change(function () {
var src = $(this).val();
$("textarea#valuePreview").html($(this).val(result.valuePreview));
});
});
I try to make the result under id=valuepreview as ‘red’, ‘orange’ and ‘green’ editable like <textarea> in HTML. My jQuery is not good (I’m a newbie) because the script above doesn’t work in any browsers, can you guys advise how I can fix the jQuery problems?
Thanks a lot.
Also I think you want to do:
Fiddle: http://jsfiddle.net/maniator/5RuTq/