Witam

Mam następujący problem, strona generuje w php xml który prototype odbiera przez ResponseXML. Wszystko ładnie śmiga pod Operą, a pod IE oraz FF js nie chce czytać wartości z xml'a.

Tak generuje xml:
  1. <?php
  2. $this->response->setHeader('Content-type', 'application/xml');
  3. $xw = new xmlWriter();
  4. $xw->openMemory();
  5. $xw->startDocument('1.0','UTF-8');
  6.  
  7. $xw->startElement('response');
  8. $xw->writeElement('id', $link[0]->id);
  9. $xw->writeElement('pr', $model->pr);
  10. $xw->writeElement('pi', $model->pi);
  11. $xw->writeElement('ol', $model->ol);
  12. $xw->writeElement('bl', $model->bl);
  13. $xw->endElement();
  14.  
  15. $xw->endDtd();
  16. echo $xw->outputMemory(true);
  17. ?>


Funkcja js która odpala sie w onComplete:
  1. function showResponse(Request)
  2. {
  3.  
  4. var root = $A(Request.responseXML.getElementsByTagName('response'))[0]; // to sie jeszcze wyknuje normalnie
  5.  
  6. var id = $A(root.getElementsByTagName('id'))[0].firstChild.nodeValue; // w FF i IE na tej linijce sie zatrzymuje wykonywanie skryptu, a w operze działa normalnie
  7. var pr = $A(root.getElementsByTagName('pr'))[0].firstChild.nodeValue;
  8. var pi = $A(root.getElementsByTagName('pi'))[0].firstChild.nodeValue;
  9. var ol = $A(root.getElementsByTagName('ol'))[0].firstChild.nodeValue;
  10. var bl = $A(root.getElementsByTagName('bl'))[0].firstChild.nodeValue;
  11. $('load'+id).style.display = 'none';
  12.  
  13. $('pr'+id).innerHTML = pr;
  14. $('pi'+id).innerHTML = pi;
  15. $('ol'+id).innerHTML = ol;
  16. $('bl'+id).innerHTML = bl;
  17. }