mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10737] Using JQuery events and JSON response.
PHPBB3-10737
This commit is contained in:
@@ -1,24 +1,3 @@
|
||||
<script>
|
||||
function showHint(str) {
|
||||
if (str.length<3) {
|
||||
document.getElementById("livesearch").innerHTML="";
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url:'{S_LIVE_SEARCH_ACTION}'+"&q="+str,
|
||||
success:function(result) {
|
||||
$("#livesearch").html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
function clearSearch() {
|
||||
setTimeout(function () {
|
||||
document.getElementById("livesearch").innerHTML="";
|
||||
}, 500);
|
||||
}
|
||||
</script>
|
||||
|
||||
<h2 class="solo">{L_FIND_USERNAME}</h2>
|
||||
|
||||
<form method="post" action="{S_MODE_ACTION}" id="search_memberlist">
|
||||
@@ -30,7 +9,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" autocomplete="off" 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 liveinput" autocomplete="off" /> <table class="table1" id="livesearch"></table></dd>
|
||||
</dl>
|
||||
<!-- IF S_EMAIL_SEARCH_ALLOWED -->
|
||||
<dl>
|
||||
|
@@ -64,27 +64,6 @@
|
||||
</script>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<script>
|
||||
function showHint(str) {
|
||||
if (str.length<3) {
|
||||
document.getElementById("livesearch").innerHTML="";
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url:'{S_LIVE_SEARCH_ACTION}'+"&q="+str,
|
||||
success:function(result) {
|
||||
$("#livesearch").html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
function clearSearch() {
|
||||
setTimeout(function () {
|
||||
document.getElementById("livesearch").innerHTML="";
|
||||
}, 500);
|
||||
}
|
||||
</script>
|
||||
|
||||
<form method="post" action="{S_MODE_ACTION}" name="search">
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
@@ -96,7 +75,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_USERNAME}{L_COLON}</b></td>
|
||||
<td class="row2"><input class="post" type="text" name="username" value="{USERNAME}" autocomplete="off" onkeyup="showHint(this.value)" onblur="clearSearch()" /> <table class="tablebg" id="livesearch"></table> </td>
|
||||
<td class="row2"><input class="post liveinput" type="text" name="username" value="{USERNAME}" autocomplete="off" /> <table class="tablebg" id="livesearch"></table></td>
|
||||
<!-- IF S_EMAIL_SEARCH_ALLOWED -->
|
||||
<td class="row1"><b class="genmed">{L_EMAIL}{L_COLON}</b></td>
|
||||
<td class="row2"><input class="post" type="email" name="email" value="{EMAIL}" /></td>
|
||||
|
Reference in New Issue
Block a user