All pastes #341159 Raw Edit

Untitled

public javascript v1 · immutable
·published 2007-02-05 11:14 UTC
rendered paste body
function SendQuery(key) {	Initialize();	var url="ajax.php?search="+key;	if(req!=null) {		req.onreadystatechange = Process('autocomplete');		req.open("GET", url, true);		req.send(null);	}}function Process(div) {	ShowDiv(div);	if (req.readyState == 4) {		if (req.status == 200) {			if(req.responseText=="")				HideDiv(div);			else {				ShowDiv(div);				document.getElementById(div).innerHTML =req.responseText;			}		}	}}