0

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

skaffman
405k96 gold badges825 silver badges775 bronze badges
asked Jun 14, 2010 at 12:02
2
  • 1
    You 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. Commented Jun 14, 2010 at 12:05
  • possible duplicate of Jquery autocomplete - how to massage the options before displaying? Commented Nov 8, 2010 at 2:19

1 Answer 1

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.

answered Jun 14, 2010 at 12:09
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.