Javascript - append to text area value - IE Chrome and Firefox
<p>How do I get this done. I am trying to append text to a text area. If some value already exists then append. I had it working but seems like it cannot work in all browsers. Is there a better way to do this? </p>

<p>Tried both ways, they don't work in Chrome, IE and FF -</p>

<pre><code>if ($('#log').value == undefined) {
$('#log').val("First: " + result[0]);
} else {
$('#log').val($('#log').value += "Second: " + result[0]);
}

if ($('#log').value == undefined) {
$('#log').val("First: " + result[0]);
} else {
$('#log').val(log.value += "Second: " + result[0]);
}
</code></pre>

<p>Without <code>If</code>, this works in Chrome but not in IE and FF -</p>

<pre><code>$('#log').val(log.value += "First: + result[0]);
</code></pre>
