I m using autocomplete from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
i managed to get data from server in below form but in autocomplete list i dont see spaces that i added after supplier , i even tried removing trim all over from the script but that does not solved my issue.Please suggest.
Exon: Supplier HJR/VAKJ -1
-
1You need to post some code, preferably enough that we can reproduce this. Remove all the other code and have only the autocomplete with a hard coded list. From there start adding back code until it breaks.tster– tster2010年06月14日 12:05:24 +00:00Commented Jun 14, 2010 at 12:05
-
possible duplicate of Jquery autocomplete - how to massage the options before displaying?Cheeso– Cheeso2010年11月08日 02:19:18 +00:00Commented Nov 8, 2010 at 2:19
1 Answer 1
That's not a jQuery or Autocomplete issue. It's how HTML works: Whitespace in the source code is irrelevant by design.
To enforce spaces that also appear on the screen, use "non-breaking spaces": Reference them either by their HTML entity name , by their numbered entity   or by replacing space characters by Chr(160) directly. It depends on your server side software how to do it, but it is reasonably simple.
So this:
Exon: Supplier HJR/VAKJ -1
would become, for example:
Exon: Supplier HJR/VAKJ -1
Be sure to use a fixed-width font for presentation, or you will see jagged columns on the screen.