[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    the XMLHttpRequest issue - funding konqueror improvement?
From:       pol <linux_milano () yahoo ! it>
Date:       2007-07-23 16:27:59
Message-ID: f82kui$b0p$1 () sea ! gmane ! org
[Download RAW message or body]

The commercial dictionary, ready for gecko-based browsers, that has been
installed on my laptop, cannot be browsed by konqueror.
I've been informed by the company that probably issues are related to
properly managing the XMLHttpRequest class.

According to the developer, while accessing the dictionary index.html file, 
page opens as expected, javascript functions on the drop down menues working
flawlessly, troubles rise as konqueror tries to render dynamical content
generated by ahah.js. (code here included; note that is not the latest
version; you can find more info here: http://www.gizax.it/ahahsection/? ) 


Are there any developers interested in framing a project focused on that
issue so as to let people pool money to raise funds?
(collection could be hosted by sourceforge, fundable.org, ... )

thank you 
--
Pol


["ahah.js" (text/x-objcsrc)]

// =========================================================================			 
// @function	AHAH function made by http://microformats.org/wiki/rest/ahah
// =========================================================================

function ahah(url, target, delay, method, parameters) {

  if (method == undefined) { 
	//  document.getElementById(target).innerHTML = 'caricamento dati in corso...';
	  if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
	  } else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	  }
	  if (req) {
		req.onreadystatechange = function() {
			ahahDone(url, target, delay, method, parameters);
		};
		req.open("GET", url, true);
		req.send("");
	  }  
  }
  if ( (method == "GET") || (method == "get") )
  {
	//  document.getElementById(target).innerHTML = 'caricamento dati in corso...';
	  if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
	  } else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	  }
	  if (req) {
		req.onreadystatechange = function() {
			ahahDone(url, target, delay, method, parameters);
		};
		req.open(method, url, true);
		req.send("");
	  }
  }

  if ( (method == "POST") || (method == "post") )
  {
	//  document.getElementById(target).innerHTML = 'caricamento dati in corso...';
	  if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
	  } else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	  }
	  if (req) {
		req.onreadystatechange = function() {
			ahahDone(url, target, delay, method, parameters);
		};
		req.open(method, url, true);
		req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		req.send(parameters);
	  }
  }
}

function ahahDone(url, target, delay, method, parameters) {
  if (req.readyState == 4) { 
    if (req.status == 200) { 
      document.getElementById(target).innerHTML = \
decodeURI(req.responseText);//decodeURI non รจ compatibile con Safari  if \
(target=="risultatoRicerca") mostraRisultati();  doppioClic()
    } else {
      document.getElementById(target).innerHTML="ahah error:\n"+req.statusText;
    }
  }
}



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic