can't put two textfield values together
<p>I have two <code>textfield</code>s one filled out locally and the other getting it's value form an <code>ajax</code> query. I need to put the two textfields values together. the value of the local <code>textfield</code> is read but the other seems to be <code>undefined</code>.</p>

<pre><code>var firstname = $("#id_of_textfield_with_local_value").val();
var lastname = $("#id_of_textfield_with_remote_value").val();
var combined = firstname + "-" + lastname;

$("#combined").val(combined);
</code></pre>

<p>the code above prints the following in the <code>textfiled</code> with <code>id=combined</code> : <code>reza-</code>
in fact the <code>lastname</code> must appear after the dash sign!</p>

<p>What should I do for it ?</p>
