V
V
v0lume2014-09-30 13:02:23
JavaScript
v0lume, 2014-09-30 13:02:23

CJuiAutocomplete why are the names not displayed normally?

Greetings

, I use CJuiAutocomplete so that the list of contacts and tasks is displayed on the input request
in the action, I form a response like
[
...
{"id":"1", "name":"Vasya", "model":"Contact"}
{"id ":"32", "name":"Purchasing a property", "model":"Deal"}
...
]

before submitting, I wrap everything in json_encode()

everything seems to be according to the documentation, but the response comes like this
fa20b3cbdcbdbe6a02cbdbed47d62e48dad0685c.jpg
type of response - text /html
and I get such a popup
817949263e6e2b44ee58e94f5b1fe296d39008c5.jpg

like in jquery autocomplete should automatically decode the response, but why doesn't it happen?
CHADNT?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zelenin, 2014-09-30
@v0lume

the answer comes normal, in utf-entities, it should be decoded normally.
the response type would be changed to application/json or something like that.
To test json_encode(..., JSON_UNESCAPED_UNICODE) - this will encode text without utf entities (5.4+)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question