AJAX - Zmiana na stronie po zmianie w pliku txt |
AJAX - Zmiana na stronie po zmianie w pliku txt |
14.02.2018, 22:44:38
Post
#1
|
|
Grupa: Zarejestrowani Postów: 140 Pomógł: 0 Dołączył: 14.01.2017 Ostrzeżenie: (0%) |
Hej.
Jak zrobić, by na stornie zmieniał się content po zmianie zawartości pliku txt bez odświeżania strony
Napisałem coś takiego i wiem że problem jest w tym, że odświeża to po załadowaniu dokumentu. Ale jak to zrobić by samo się przeładowywało? Ok już chyba znalazłem rozwiązanie. gotowiec z neta, ale działa
Zrobiłem, działa dobrze
Ale teraz mam inny problem. Już opisuję: Na stronie pobierane są dane z sqla i dla każdego wyniku tworzony jest div o ID odpowiadającym ID z bazy plus suma kontrolna, np ID sesji, albo konkretna tekst (jeszcze nie zdecydowałem). Jak zrobić, by powyższa funkcja działała dla każdego diva. Dla każdego z nich jest oddzielny plik zamiast test.txt jest to indywidualna nazwa (również pobierana z bazy). |
|
|
14.02.2018, 23:31:52
Post
#2
|
|
Grupa: Zarejestrowani Postów: 460 Pomógł: 49 Dołączył: 5.06.2011 Ostrzeżenie: (0%) |
https://stackoverflow.com/a/44036573/5673289
Musisz skompletować tablicę tych identyfikatorów i wykorzystać parametr value tej funkcji anonimowej Ten post edytował trzczy 14.02.2018, 23:33:38 |
|
|
15.02.2018, 01:31:33
Post
#3
|
|
Grupa: Zarejestrowani Postów: 140 Pomógł: 0 Dołączył: 14.01.2017 Ostrzeżenie: (0%) |
Zrobiłem tak
i funkcja w klasie dvr
Czy tak może być? |
|
|
Wersja Lo-Fi | Aktualny czas: 22.09.2024 - 05:12 |