JQuery concatenation
<p>This works but only if the values are there when the form loads:</p>

<pre><code>$('CSZ').val(
$('City').val() + ', ' +  
$('State').val() + ' ' + 
$('Zip']).val()
</code></pre>

<p>I tried a function like this to try to concatenate as the fields are populated but didn't work.</p>

<pre><code>$('CSZ').blur(function() {
$('City').val() + ', ' +  
$('State').val() + ' ' + 
$('ZipCode').val()});
</code></pre>

<p>But didn't get any results. Any ideas?</p>

<p>Thanks.</p>

<pre><code>OK this works. Is there any simpler way to write this?

function SetMainLine() {var csz = 
$(spec['V08_City']).val() + ', ' +  
$(spec['V09_State']).val() + ' ' + 
$(spec['V10_ZipCode']).val();
$(spec['V01_Mainline']).val(csz);
}

spec['V08_City'].onchange = SetMainLine;
spec['V09_State'].onchange = SetMainLine;
spec['V10_ZipCode'].onchange = SetMainLine;

The spec[''] is just calling a form field from a database. 
</code></pre>
