Pass parameter to autoComplete

Pass parameter to autoComplete

I need to pass a parameter to an autoComplete call. During the onload init call I load a parameter into a hidden text box. I then use another autoComplete to select an employee name and their associated employee ID when I then store in the hidden text box.

From a second autoComplete I use the value from the hidden text box to make a selection from the database. The problem is that when the second autoComplete runs the value that is used from the hidden text box is the initial value not the updated value.

This is the code for the autoComplete...

  1.     // Procedure to autocomplete by Dates
  2.     $('.autoDate').autocomplete({
  3.         minLength: 1,
  4.         autoFocus: true,
  5.    
  6.         source: 'files_json/auto_Timesheets_Date.php?tsEmpNum=' + $('#ts_EmpNum').val(),
  7.         select:function(evt, ui)
  8.             {
  9.                 form_edit.ts_Date.value = ui.item.tsDate;
  10.                 form_edit.ts_Status.value = ui.item.tsStatus;
  11.             }
  12.     });// End of autoDate
TIA for any assistance
jdadwilson