Stefan,

>i did some test/demos to play with autocomplete plugin.
>
>       http://kilp.net/test/autocomplete/autocomplete-demo.html
>
>i want a kind of highlighted searchresult. for that reason my php script
>(sever-side) generates data that looks like
>
><htmlcode> | <plaintext> | id1 \n
><htmlcode> | <plaintext> | id1 \n

I just looked at the output your server side template is producing and it
looks like this:

Daniel  <span class="highlight0">Jo</span>hns

|Daniel Johns

|84

All of that should be on a single line. Using a tool like Firebug makes it
easy to view what you're AJAX calls are returning.

Here's an example of your output:
http://kilp.net/test/autocomplete/namesearch.php?q=jo&limit=20

Each record should be in the format:
Daniel <span class="highlight0">Jo</span>hns|Daniel Johns|84

Also, you're using Joern's version of the plugin, so adding <span /> tags to
highlight text is going to cause problems (because his code also wraps
matches in <strong /> tags.)

You'd be better off controlling the way his <strong /> tags look via CSS
styling.

-Dan


Reply via email to