Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem js ajax
rychu123
post
Post #1





Grupa: Zarejestrowani
Postów: 194
Pomógł: 1
Dołączył: 18.09.2008

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


witam, mam problem z tym skryptem tzn nie działa a ajaxa to ja nie umie ;/

  1. function createRreg(){
  2. var reg = null;
  3. if(window.XMLHttpRequest){
  4. reg = new XHMLttpRequest();
  5. }else{
  6. req = new ActiveXObject("Microsoft.XHLMTTP");
  7. }
  8. return req;
  9. }
  10.  
  11. function doSubmit(){
  12. var req = careateReq();
  13. if(reg == null){
  14. alert('brak');
  15. return;
  16. }
  17. var url = "s.php";
  18. req.open("GET", url, true);
  19. req.onreadystatechange = function(){
  20. if(req.readyState ==4 && req.status==200){
  21.  
  22. document.getElementById('tt')= innerHTML = req.responseText;
  23. }
  24. }
  25. req.send(null);
  26. }
  27. window.onload = function(){
  28.  
  29. doSubmit();
  30. }
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 27.09.2025 - 09:49