Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Prosze o pomoc
robal94
post
Post #1





Grupa: Zarejestrowani
Postów: 150
Pomógł: 2
Dołączył: 14.06.2009
Skąd: Czestochowa

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


Witam! Proszę o to aby mi pomóc i nie irytujcie się, PRROSZE! nie wiem dlaczego mi nie wychodzi. Oto plik index.php:
  1. <head>
  2. <script type="text/javascript">
  3. <!--
  4. function ajaxFunction () {
  5. var ajaxRequest;
  6.  
  7. try {
  8. ajaxRequest = new XMLHttpRequest ();
  9. } Catch (e) {
  10. try {
  11. ajaxRequest = new ActiveXObject ( "Msxml2.XMLHTTP");
  12. } Catch (e) {
  13. try {
  14. ajaxRequest = new ActiveXObject ( "Microsoft.XMLHTTP");
  15. } Catch (e) {
  16. alert ( "Twoja przeglądarka nie obsługuje AJAX'a!!!");
  17. return false;
  18. }
  19. }
  20. }
  21. ajaxRequest.onreadystatechange = function () {
  22. if (ajaxRequest.readyState == 4) {
  23. document.myForm.time.value = ajaxRequest.responseText;
  24. }
  25. }
  26. ajaxRequest.open ( "GET", "serverTime.php", true);
  27. ajaxRequest.send(null);
  28.  
  29. }
  30.  
  31. //-->
  32. </script>
  33. </head>
  34.  
  35. <body>
  36. <div>
  37. <form name='myForm' action="#">
  38. Imię i nazwisko: <input onChange="ajaxFunction();" type="text" name="username" /> <br />
  39. Godzina: <input type="text" name="time" />
  40. <button type="button" onClick="ajaxFunction();">klik</button>
  41. </form>
  42. </div>
  43. </body>
  44. </html>


a to serverTime.php
  1. <?
  2. echo date("H:i:s");
  3. ?>


I nie działa! o co chodzi! gdzie jest błąd! Nie mogę znaleźć. Proszę o pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Pytasz o to juz tutaj
http://forum.php.pl/index.php?showtopic=137470&hl=
Jeden temat starczy
Go to the top of the page
+Quote Post

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: 15.09.2025 - 08:49