On 17/08/06, Dan Atkinson <[EMAIL PROTECTED]> wrote:
>
> Hey there!
>
> This is a wonderful piece of code you have here!
>
> I'm trying to intergrate it into my current project but I'm having an issue.
>
> My query results contain a link (like Google Suggest results), but when I
> click on a result in the autocomplete, it just puts the entire link (HTML
> included) in the textbox text.
>
> What do I need to do to make it jump to the given link, instead of putting
> the selected item into the textbox?
>
> Thanks very much!
>
> Dan
> --

What I would do is return the results from the queried page with the
link after a |

jQuery|http://jquery.com
Google|http://www.google.com
Yahoo|http:www.yahoo.com


Then do the following:

$("#mysearch").autocomplete("sites.php",
        {
                minChars:3,
                matchSubset:1,
                matchContains:1,
                cacheLength:10,
                onItemSelect: navigate
        }
)
function navigation(li)
{
        if (li.extra)
        {
                location.href = li.extra[0];
        }
}

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to