Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di miki.
    Registrato dal
    Oct 2004
    Messaggi
    1,918

    [Ajax] browser bloccato fino allo status 4 in Firefox

    Ho uno script che genera una chiamata ad un file con ajax.
    Il problema e' che quando clicco con sul link che chiama la funzione, negli altri browser tutto funziona correttamente, in Firefox si blocca fino a quando non ha finito di caricare e quindi e' allo status 4.

    codice:
    function createRequestObject() {
    	
    	var httpRequest=false;
    
    	if (window.XMLHttpRequest) {
    		httpRequest = new XMLHttpRequest();
    		if (httpRequest.overrideMimeType) httpRequest.overrideMimeType('text/xml');
    	} 
    	else if (window.ActiveXObject) {
    		try {
    			httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    		} catch (e) {
    			try {
    				httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
    			} catch(e){}
            }
    	}
    
    	return httpRequest;
    }
    
    var http = createRequestObject();
    
    var querystring = "";
    
    function checkSubmit(form){
    
    	var fcli = '';
    	var fdob = '';
    
    	querystring = "cli=" + escape(fcli) + "&dob=" + escape(fdob)+"&rand="+Math.random();
    
    	http.open('get', 'xmltest.php?'+querystring);
    	http.onreadystatechange = handleResponse;
    	http.send(null);
    	
    	return false;
    }
    
    function handleResponse() {
    
    	if(http.readyState == 4){
    		if(http.status == '404'){
    			closeDiv('fullScreen');
    		}else {
    		eval(http.responseText);
    		}
    			
    	} 
    }
    scusate se ci sono gia' altri 3d, ma io ho fatto una ricerca e non ho trovato niente.
    You cannot discover new oceans unless you have the courage to lose sight of the shore

    Caro Dio, quando nelle preghiere ti chiedevo di far morire quel pedofilo truccato, liftato,mentalmente disturbato e di colore indefinibile, non intendevo Michael Jackson.

  2. #2
    Utente di HTML.it L'avatar di miki.
    Registrato dal
    Oct 2004
    Messaggi
    1,918
    scusate, risolto.
    E' firebug che da quel problema.
    You cannot discover new oceans unless you have the courage to lose sight of the shore

    Caro Dio, quando nelle preghiere ti chiedevo di far morire quel pedofilo truccato, liftato,mentalmente disturbato e di colore indefinibile, non intendevo Michael Jackson.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.