Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Ajax] Firefox wywala jakiś tam błąd :)
Babcia@Stefa
post
Post #1





Grupa: Zarejestrowani
Postów: 654
Pomógł: 17
Dołączył: 19.03.2006
Skąd: z kosmosu ;)

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


Witam, firefox wywala mi taki błąd:

Kod
Błąd: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: http://babciastefa.boo.pl/katalog/upload.js :: GetSource :: line 19"  data: no]


Dla kodu:

  1. <?php
  2. if (window.XMLHttpRequest) 
  3. { 
  4.  ObiektXMLHttp = new XMLHttpRequest(); 
  5. } 
  6. else if (window.ActiveXObject) 
  7. { 
  8. ObiektXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
  9. }
  10.  
  11. function GetSource(source) { 
  12. alert(source);
  13. if(ObiektXMLHttp) 
  14. {
  15. ObiektXMLHttp.open("GET", source);
  16.  
  17. ObiektXMLHttp.onreadystatechange = function() 
  18. {
  19. if (ObiektXMLHttp.readyState == 4)
  20. {
  21. return ObiektXMLHttp.responseText; 
  22. }
  23. } 
  24. ObiektXMLHttp.send(null); 
  25. } 
  26. }
  27.  
  28. function disapear(window)
  29. {
  30. document.getElementById(window).innerHTML = '';
  31. }
  32.  
  33. function BeginAdd()
  34. {
  35. var doc = document.getElementById('photos').innerHTML;
  36. var text = document.getElementById('link_images').value;
  37. var source = GetSource('Photo-add.html?'+text);
  38. if(source != 'Nie mozna pobrac obrazka')
  39. {
  40. doc += source;
  41. } else {
  42. alert(source);
  43. }
  44. }
  45.  
  46. function CounterAdd()
  47. {
  48. document.getElementById('counter').value = parseInt(document.getElementById('counter').value)+1;
  49. }
  50.  
  51. function CounterDelete()
  52. {
  53. document.getElementById('counter').value = parseInt(document.getElementById('counter').value)-1;
  54. }
  55. ?>


Dziękuję, Babcia@Stefa

Ten post edytował Babcia@Stefa 26.04.2008, 13:24:37


--------------------
Środowisko testowe (desktop) - Gedit, lighttpd, sftp, rsync, xfce4-terminal, chromium, firefox4 | System: Gentoo ~x86
O'Neill - serwer WWW @ lighttpd, links, nano, rsyncd, sftpd | System: Debian
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 Aktualny czas: 20.08.2025 - 07:13