From 26d2e45d69e6be15f40164a9dbe80fbb7d31d1ab Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 9 Aug 2005 10:38:55 +0000 Subject: Added global categories search back in. AJAX now searches invisibly and only displays search box is result returned git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@146 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/admin-functions.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'wp-inst/wp-admin/admin-functions.php') diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php index 1d9b377..88944f4 100644 --- a/wp-inst/wp-admin/admin-functions.php +++ b/wp-inst/wp-admin/admin-functions.php @@ -1393,7 +1393,6 @@ function AJAX_search_box( $get_url, $search_field = 'newvalue', $search_results_ function update_AJAX_search_box( username ) { document.getElementById("").value=username; - document.getElementById("").innerHTML = ""; document.getElementById("").style.display = 'none'; return false; } @@ -1444,12 +1443,16 @@ function AJAX_search_box( $get_url, $search_field = 'newvalue', $search_results_ } function doSearch() { - displayBox.style.display = ''; - displayBox.innerHTML = "Searching ..."; xmlhttp.open("GET",""+valBox.value,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { - displayBox.innerHTML = xmlhttp.responseText; + if( xmlhttp.responseText != '' ) { + displayBox.style.display = ''; + displayBox.innerHTML = xmlhttp.responseText; + } else { + valBox.focus(); + displayBox.style.display = 'none'; + } } } xmlhttp.send(null); -- cgit