Redirecting users on select from autocomplete?

百般思念 提交于 2019-12-04 13:17:08

Are you saying that it is successfully redirecting but rather than going to...

employee_profile.aspx?id=91210

It is going to...

employee_profile.aspx?id=John Doe-91210 ??

If that is the case... then you can simply perform your striping inside your result function...

$('#fname2').result(function(event, data, formatted) {
        var employeeId = data.split("-")[1];
        location.href = "employee_profile.aspx?id=" + employeeId
 });

I think location.href should be window.location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!