1. function test(id) {
  2. if (window.XMLHttpRequest) {
  3. xmlHttp = new XMLHttpRequest();
  4. }
  5. else {
  6. if (window.ActiveXObject) {
  7. try {
  8. xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  9. }
  10. catch (e) { }
  11. }
  12. }
  13.  
  14. if (xmlHttp) {
  15. var opt="?co=lista&id="+id;
  16. xmlHttp.onreadystatechange = lista;
  17. xmlHttp.open("GET", "lista.php" + opt, true);
  18. xmlHttp.send(null);
  19. }
  20. else {
  21. document.getElementById("alert").innerHTML = "Sorry, but I couldn't create an XMLHttpRequest";
  22. }
  23. }
  24. function lista()
  25. {
  26. if (xmlHttp.readyState == 4)
  27. {
  28. if (xmlHttp.status == 200)
  29. {
  30. alert(xmlHttp.responseXML)
  31. if (xmlHttp.responseXML)
  32. {
  33.  
  34. document.getElementById("lista").innerHTML = xmlHttp.responseText;;
  35. }
  36. }
  37. }
  38. }

we wszystkich przeglądarkach wkleja text do diva lista tylko w firefox xmlHttp.responseXML ma wartość null??