开发者

JQuery AJAX Autocomplete issue with PHP and MySQL

I'm having a problem with my autocomplete. It works on another one of my pages, but on this one, it doesn't work. It's returning the correct number of entries, but they are all "blank" (or at least black so I can't see it), and selecting one does not put it into the text field either.

I'm using this: http://papermashup.com/jquery-php-ajax-autosuggest/

My page right now looks like

JQuery AJAX Autocomplete issue with PHP and MySQL

Any suggestions?

Thanks!

I'd post my code, but it's pretty much exactly what's on the site linked above, with some variables changed, and embedded into a PHP. Let me know if you want to see it (I don't want to paste 开发者_JS百科it here and make the page huge and fugly).

Oh and this is taking it from a column in a MySQL database.


I think this link is quite useful to understand the technique. After you got the AJAX technique, you may simply change your php files which can run sql queries etc. You may show the results in that way with a simple div, very trivial css implementation would be enough. I think the hardest part is solved here:

http://www.w3schools.com/ajax/ajax_aspphp.asp


maybe your problem lies within encoding, jquery needs utf8 in the default settings, but without any code, I can only speculate...

try utf8_encode($output) instead of only returning the output...

also maybe your ajax request awaits a specific datastructure (json/xml/ etc)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜