diff options
author | Suhaib Khan <suhebjerk@gmail.com> | 2014-02-09 21:57:44 +0530 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-04-23 09:11:39 -0700 |
commit | b5ee81dae6f097e97049a756763d1b3119f61573 (patch) | |
tree | 300b043af564fae53f531d5c7c6d97ce63d74dbe /phpBB/styles/prosilver/template/memberlist_search.html | |
parent | bc67377400ad11470fb1975af1e07b136f07a24d (diff) | |
download | forums-b5ee81dae6f097e97049a756763d1b3119f61573.tar forums-b5ee81dae6f097e97049a756763d1b3119f61573.tar.gz forums-b5ee81dae6f097e97049a756763d1b3119f61573.tar.bz2 forums-b5ee81dae6f097e97049a756763d1b3119f61573.tar.xz forums-b5ee81dae6f097e97049a756763d1b3119f61573.zip |
[ticket/10737] Code fixes in AJAX search feature
PHPBB3-10737
Diffstat (limited to 'phpBB/styles/prosilver/template/memberlist_search.html')
-rw-r--r-- | phpBB/styles/prosilver/template/memberlist_search.html | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 4e28c26d3a..59b7b0a5a7 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -1,23 +1,21 @@ <script> - function showHint(str) - { - if (str.length<3) - { + function showHint(str) { + if (str.length<3) { document.getElementById("livesearch").innerHTML=""; return; - } + } $.ajax({ url:'{S_LIVE_SEARCH_ACTION}'+"&q="+str, - success:function(result){ + success:function(result) { $("#livesearch").html(result); } }); } - - function clearSearch() - { - document.getElementById("livesearch").innerHTML=""; + function clearSearch() { + setTimeout(function () { + document.getElementById("livesearch").innerHTML=""; + }, 500); } </script> @@ -32,7 +30,7 @@ <fieldset class="fields1 column1"> <dl> <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt> - <dd><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" onkeyup="showHint(this.value)" onblur="clearSearch()" /> <table class="table1" id="livesearch"></table> </dd> + <dd><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" autocomplete="off" onkeyup="showHint(this.value)" onblur="clearSearch()" /> <table class="table1" id="livesearch"></table> </dd> </dl> <!-- IF S_EMAIL_SEARCH_ALLOWED --> <dl> |