Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> błąd w kodzi+brak reakcji serwera
donmateo
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 10.08.2008

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


witam
napisałem taką oto stronke i nie mam pojęcia dlaczego nie ma żadnej reakcji. Ma ktoś jakiś pomysł albo dostrzega jakiś błąd?

Kod
<html>
     <head>
         <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
         <script type="text/javascript" language="javascript">
         var http_request = false;
        
         if (window.XMLHttpRequest) {
             http_request = new XMLHttpRequest();
             if (http_request.overrideMimeType) {
                 http_request.overrideMimeType('text/xml'); }
                
            
         } else if (window.ActiveXObject) {
             try {
                 http_request = new ActiveXObject("Msxml2.XMLHTTP"); }
             catch (e) {
                 try {
                     http_request = new ActiveXObject("Microsoft.XMLHTTP"); }
                 catch (e) {}
             }
         }
        
         if (!http_request) {
             alert('Poddaję się Sad Nie mogę stworzyć instancji obiektu XMLHTTP');
             return false; }
            
         function getData(zrodlo, cel) {
              if(http_request) {
                var cel = document.getElementById(cel);
                http_request.open("GET", zrodlo, true);

                 http_request.onreadystatechange = function() {
                      if (http_request.readyState == 4){
                         cel.innerHTML = http_request.responseText;
                    }
                 }
                  
                 http_request.send(null);
             }
         }  
      
      
       </script>    
     <link rel="stylesheet" type="text/css" href="style.css" />
     </head>
     <body>
     <div name="kontener" id="kontener">
         <form>
         <input type = "button" value = "show" onclick = "getData('test.html', 'div')">
         </form>

         <div id="div"> </div>

     </div>
     </body>
</html>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.12.2025 - 07:48