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
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 byChr(160)directly. It depends on your server side software how to do it, but it is reasonably simple.So this:
would become, for example:
Be sure to use a fixed-width font for presentation, or you will see jagged columns on the screen.