diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-09 10:38:55 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-09 10:38:55 +0000 |
| commit | 26d2e45d69e6be15f40164a9dbe80fbb7d31d1ab (patch) | |
| tree | 834d79136f06a10c6b43d1e66a5c218473f37280 /wp-inst/wp-admin/admin-functions.php | |
| parent | 54ab58f165a4146b50796d3d6f5310e15f3e4a38 (diff) | |
| download | wordpress-mu-26d2e45d69e6be15f40164a9dbe80fbb7d31d1ab.tar.gz wordpress-mu-26d2e45d69e6be15f40164a9dbe80fbb7d31d1ab.tar.xz wordpress-mu-26d2e45d69e6be15f40164a9dbe80fbb7d31d1ab.zip | |
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
Diffstat (limited to 'wp-inst/wp-admin/admin-functions.php')
| -rw-r--r-- | wp-inst/wp-admin/admin-functions.php | 11 |
1 files changed, 7 insertions, 4 deletions
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("<?php echo $search_field ?>").value=username; - document.getElementById("<?php echo $search_results_field ?>").innerHTML = "<?php _e( 'Search Results' ) ?>"; document.getElementById("<?php echo $search_results_field ?>").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","<?php echo $get_url ?>"+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); |
