![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 33 Pomógł: 6 Dołączył: 30.06.2008 Skąd: Bytom Ostrzeżenie: (0%) ![]() ![]() |
Jak zrobić doświeżania div'a w jquery?
W mintAjax wyglądało to tak: Kod function refresh() { var req = mint.Request(); req.OnSuccess = function () { document.getElementById("mapa").innerHTML = this.responseText;}, req.OnError = function () {document.getElementById("mapa").innerHTML = "Wystąpił błąd !! </br>" + this.responseText + "</br>" + req.xmlHttpRequest.statusText;} req.Send ("moduly/mapa.php"); } var ginter=setInterval(refresh, 1000); Przerzuciłem się na jQuery(według opini frameworków js) i nie wiem jak to przerobić na jquery... Proszę o pomoc :) Ten post edytował Kemsan 14.10.2008, 06:50:20 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 441 Pomógł: 71 Dołączył: 3.09.2007 Skąd: wrocław Ostrzeżenie: (0%) ![]() ![]() |
Zmiast
Kod function () { document.getElementById("mapa").innerHTML = this.responseText; wpisz Kod $("#mapa").text(this.responseText); powinno działać (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Ten post edytował zzeus 13.10.2008, 20:33:03 |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 33 Pomógł: 6 Dołączył: 30.06.2008 Skąd: Bytom Ostrzeżenie: (0%) ![]() ![]() |
A co z
Kod var req = mint.Request(); ?
|
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 441 Pomógł: 71 Dołączył: 3.09.2007 Skąd: wrocław Ostrzeżenie: (0%) ![]() ![]() |
Myślałem że chodzi Ci o zmianę zawartości samego div'a. Jak chodzi o resztę to wszystko jest tutaj napisane - http://docs.jquery.com/Ajax
|
|
|
![]()
Post
#5
|
|
Grupa: Moderatorzy Postów: 2 921 Pomógł: 269 Dołączył: 11.08.2005 Skąd: 127.0.0.1 ![]() |
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 24.08.2025 - 02:18 |