Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js] warunek w AJAX ?
SN@JPER^
post 27.05.2007, 12:00:26
Post #1





Grupa: Zarejestrowani
Postów: 266
Pomógł: 0
Dołączył: 4.01.2007
Skąd: Szczecin

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


Witam,

nie mogę dojść do czego służy zapis:

  1. message.className = (result == 0) ? "error" : "hidden";


Czyżby to był warunek; jeżeli result == 0 wyswietla error, jesli jest inacej hidden ?

dla ułątwienia wklejam całą funkcję:

  1. function readServers()
  2. {
  3.  
  4. var responseXML = xmlHttp.responseXML;
  5. var xmlDoc = responseXML.documentElement;
  6. var result = xmlDoc.getElementByTagName("result")[0].firstChild.data;
  7. var fieldID = xmlDoc.getElementByTagName("fieldID")[0].firstChild.data;
  8. var message = document.getElementById(fieldID + "Failed");
  9.  
  10. message.className = (result == 0) ? "error" : "hidden";
  11.  
  12. }
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 7.07.2025 - 13:55