i am working on a small project to grab some html codes stored in mysql, assign using smarty then use jquery to assign the value to a in html. so far i am able to get this working but for jquery is not processing the html codes.
jquery
{literal}
<script>
function code(val){
var id = val;
if (id == 'msg'){
$('#txt_codes').val('{/literal}{$eml_codes}{literal}');}
}
</script>
{/literal}
{$eml_codes} // outputs fine in html but nothing in jquery. if i use regular text rather
than html codes it works.
//options
<select name="type" onchange="code(this.value)">
<option value"msg">MSG</option>
<option value"other">other</option>
</select>
//textarea
<textarea id="txt_codes"></textarea>
any idea on how i can pass actual html codes?