Updating an input value with Jquery
<p>I have a form with a few fields, one of which should be updated based on the value of another.  The value of the first is POSTed to another URL, and the returned value should be used to fill the second field.  Here's the code:</p>

<pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script&gt;        
    function lookup(rid) {
                    $.get("/handler?rid=" + $("input#rid").val(), function(update_rid){
                        $("#name").val(html(update_rid));
                    })
                }
    &lt;/script&gt;
        &lt;form name="new_alert"&gt;
            &lt;input type="text" name="rid" id="rid" onkeyup="lookup(this.value);"&gt;
            &lt;br /&gt;
            &lt;input type="text" name="name" id="name"&gt;  
        &lt;/form&gt;
</code></pre>

<p>The POST works fine, and the correct data is returned from /hander, which I confirmed by making a test  and filling it using $("#testdiv").html(update_rid);</p>

<p>So it seems like the problem is in the way I'm trying to update the value, but I can't get past that.</p>
