![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 271 Pomógł: 4 Dołączył: 5.01.2005 Ostrzeżenie: (0%) ![]() ![]() |
witam, pobrałem sobie przykład numer 2 z advajax'a (ten gdzie jest dynamiczna tabela), generuje sobie XMLa i o ile pod IE jest ok, to pod FF mam dziwne błedy, pierwszy w firebug'u to:
idąc dalej i sprawdzając w firebugu record (w watch) otrzymuje dziwne wg. mnie wartości (chodzi o wartości childNodes: to fragment, ale chodzi o to, że co druga pozycja to \n, kod to poniżej listingi js i PHP [html]<script language="javascript" type="text/javascript"> <!-- <![CDATA[ function $(parametr){ return document.getElementById(parametr); } function parseRecords(xml) { startId = 1; record = xml.getElementsByTagName("producent"); result = ""; for (i = 0; i < record.length; i++) { for (j = 0; j < 3; j++) { alert(record[i].childNodes[j].childNodes[0].nodeValue); } } return result; } function prezzo(p) { advAJAX.setDefaultParameters({ onSuccess : function(obj) { alert(obj.responseText); parseRecords(obj.responseXML); } }); advAJAX.get({ url: "edtCat.php", tag: "big" }); } // ]]> --> </script> a kod PHP generujący xmla wygląda tak:
kod wyświetlający jest tutaj: http://system.promediapc.pl/edtcategory.php a plik tworzący XMLa tu: http://system.promediapc.pl/edtCat.php Proszę o pomoc. Ten post edytował chomiczek 24.02.2007, 11:11:54 -------------------- created by chomiczek
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 15:19 |