Просмотр поста

.
Fublin

Бермудский, типа такого

<script>  
    function Content(link) {  
  
        var cont = document.getElementById('contentPr');  
        var loading = document.getElementById('lo');  
  
        cont.innerHTML = loading.innerHTML;  
  
        var http = createRequestObject();  
        if( http )   
        {  
            http.open('get', link);  
            http.onreadystatechange = function ()   
            {  
                if(http.readyState == 4)   
                {  
                    cont.innerHTML = http.responseText;  
                }  
            }  
            http.send(null);      
        }  
        else   
        {  
            document.location = link;  
        }  
    }  
  
    // создание ajax объекта  

    function createRequestObject()   
    {  
        try { return new XMLHttpRequest() }  
        catch(e)   
        {  
            try { return new ActiveXObject('Msxml2.XMLHTTP') }  
            catch(e)   
            {  
                try { return new ActiveXObject('Microsoft.XMLHTTP') }  
                catch(e) { return null; }  
            }  
        }  
    }  
</script>  
      
    
    <div id="contentPr">  
    </div>  
  
    <div id="lo" style="display: none">  
    Идет загрузка..  
    </div>  
<script>
Content('../pages/test.php');
</script>