Вопрос

I have files "a.txt", "b.txt", "c.txt", ... Every file contain translation for words.
English-Russian, it seems like:
able 'eibl способный
about x'baut приблизительно; о
above q'bAv над, выше

Is it possible to realize live search in this dictionary just by AJAX (without PHP or something else) ? If possible, could you explain please? Some example will be very helpful.

Thanks all in advance.

Это было полезно?

Решение

Sure it's possible. Anything's possible if you just believe!

Use your AJAX to call the txt file from your server, then use the .search("some word"); method to find what you need.

This is an aweful solution though because the user will have to download the entire text file, and your client side code will have to parse the entire text to find what you're looking for.

You're much better off using PHP/MySQL.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top