Two questions on autocomplete

Two questions on autocomplete

I'm new to jquery but am getting more comfortable as I go.  I have a specific question on the ui autocomplete widget and, probably a general jquery/ajax question.

Here's what I'm trying to do:  Use an input box to update a field with a label and a hidden field with a value.  This works fine but as you can see in my code below, I need a return(false) because after #autocomplete is populated with the label, it then reverts back to the value without this call.  This doesn't seem right to me but the return(false) takes care of the problem.  Any insights?

Second question: I want the url I send to be dynamic using the value of grpDir.  This value is read once the form is loaded.  How do I make it update when the autocomplete actions take place?

Thanks in advance for your help.  Excerpts of my code is below:

  1. Directory<BR>
    <div><br>
    <input type="radio" id="grpDir" name="grpDir" value="1000"> A
    <input type="radio" id="grpDir" name="grpDir" value="2000" checked> B
    <input type="radio" id="grpDir" name="grpDir" value="5000"> C
    <input type="radio" id="grpDir" name="grpDir" value="6000"> D
    </div> 
    <input id="autocomplete" size="30" />
    <input id="vendorNo" />







and the javascript:
  1.   $(function() {
        $("#autocomplete").autocomplete({
        source: "autocomplete.asp?dir="+$("input[name=grpDir]:checked").val(),
        minLength: 2,
            select: function(event, ui) {
          $('#vendorNo').val(ui.item.value);
          $('#autocomplete').val(ui.item.label);
          return(false);
          }
       
        });
      });