Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [mintAjax] responseText - w FireBugu w konsoli jest, w JS - nie
Apocalyptiq
post
Post #1





Grupa: Zarejestrowani
Postów: 230
Pomógł: 3
Dołączył: 8.01.2008

Ostrzeżenie: (10%)
X----


Mam taką funkcje:
Kod
function checkMarket(marketId){
     var check=mint.Request().AddParam("marketId",marketId).AddParam("lastTime",$("lastTime").value);
     check.onSuccess=function(){
         if(this.responseText!=""){
             var offers=this.responseText.split("|");
             for each(var offer in offers){
                 var row=$("offers").insertRow();
                 var user=row.insertCell();
                 user.innerHTML=offer[0];
                 var price=row.insertCell();
                 price.innerHTML=offer[1];
                 var offered=row.insertCell();
                 offered.innerHTML=offer[2];
             }
             $("lastTime").value=offer[2];
         }
     }
     check.Send("checkMarket.php");
}

Jak sprawdzałem, ten request dostaje dobrą odpowiedź tekstową (responseText), tylko że funkcja onSuccess się nie wykonuje - jak sprawdziłem w FireBugu, w zakładce "Skrypt", tam repsonseText=""... Ale w "Konsoli" w FireBugu ten responseText jest... Co tu może być nie tak?

Ten post edytował Apocalyptiq 5.11.2008, 18:43:24
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
lord_t
post
Post #2





Grupa: Zarejestrowani
Postów: 603
Pomógł: 131
Dołączył: 24.07.2007
Skąd: Górny Śląsk

Ostrzeżenie: (0%)
-----


zamien:
Kod
check.onSuccess=function(){

na
Kod
check.OnSuccess=function(){
Go to the top of the page
+Quote Post
Apocalyptiq
post
Post #3





Grupa: Zarejestrowani
Postów: 230
Pomógł: 3
Dołączył: 8.01.2008

Ostrzeżenie: (10%)
X----


DZIĘKI STARY! Kilka godzin już nad tym siedze (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) Zwykle najwięcej czasu tracę na tego typu literówkach :| Nie wiedziałem że JS jest takie delikatne na wielkość liter (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) onClick na przykład czy onclick tak samo interpretuje... Jeszcze raz dzięki lord_t! (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.09.2025 - 16:30