多个JQuery UI自动完成框-获取所选框的值

多个JQuery UI自动完成框-获取所选框的值,jquery,autocomplete,jquery-ui-autocomplete,Jquery,Autocomplete,Jquery Ui Autocomplete,我在一个页面上有三个jQuery UI“自动完成”输入字段: <select id="combobox1"><?php putSome1ValuesHere(); ?></select> <select id="combobox2"><?php putSome2ValuesHere(); ?></select> <select id="combobox3"><?php putSome3ValuesHere(

我在一个页面上有三个jQuery UI“自动完成”输入字段:

<select id="combobox1"><?php putSome1ValuesHere(); ?></select>
<select id="combobox2"><?php putSome2ValuesHere(); ?></select>
<select id="combobox3"><?php putSome3ValuesHere(); ?></select>
我想做的是根据组合框中选择的值重定向到另一个页面。如果我明确地命名其中一个框,这就可以了:

select: function( event, ui ) {
    ui.item.option.selected = true;
    that._trigger( "selected", event, {
        item: ui.item.option
    });
    window.location.href = $('#combobox1').val() + ".php";
},

我不能做的是根据单击的组合框的值使其重定向。我不能硬连线,因为三个框中的任何一个都可以点击。但是,我对jQuery了解不够,无法访问调用“select”函数的框的值。如果有人能提供任何建议,我将不胜感激。我想我已经在上面提供了足够的信息,但是如果需要什么,请告诉我。谢谢

组合框小部件代码select中是select标记的jQuery对象,该对象已被隐藏

window.location.href = select.val() + ".php";
使用select.val演示更改此选项

select: function( event, ui ) {
  ui.item.option.selected = true;
  that._trigger( "selected", event, {
      item: ui.item.option
 });
 window.location.href = $('#combobox1').val() + ".php";
},


希望这有帮助

谢谢-当我尝试这个时,我只得到:array1{[areaID]=>string0}转储到屏幕上,其他什么都没有。对不起,这将教会我如何快速回复!上面的一点是我的PHP变得不稳定,因为仍然没有使用$this.val传递给它的值。我尝试设置一个警报来显示$9this.val的值,结果显示为“未定义”。combobox插件来自哪里?链接?它是jQueryUI的一部分:有时候,该链接只是在Safari中为我显示默认演示,但在右侧的菜单中有一个“combobox”演示的链接。还包括我用作页面基础的其余代码。谢谢
select: function( event, ui ) {
  ui.item.option.selected = true;
  that._trigger( "selected", event, {
      item: ui.item.option
 });
 window.location.href = $('#combobox1').val() + ".php";
},
select: function( event, ui ) {
    ui.item.option.selected = true;
    that._trigger( "selected", event, {
    item: ui.item.option
    });
    window.location.href = $(this).val() + ".php";
},