Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.3.4
-
Fix Version/s: None
-
Component/s: Ajax
-
Labels:None
Description
The current implementation sends an ajax request on every keyup event causing lots of network traffic and server load. The tag should support an attribute queryDelay to reduce the number of request. For example the tag should render as something similar to the following (although the script tag causes problems if rendered in an ajax response):
<script type="text/javascript">var timer;</script>
<input name="query" id="propertyQuery" value="" onkeyup="clearTimeout(timer); timer = setTimeout(function ajax_call() { new Ajax.Updater('foundProperties','/editor/resource/queryPropertyRemote/147/155',{asynchronous:true,evalScripts:true,parameters:{query: $('propertyQuery').value}});}, 1000);" type="text">
There should also be an attribute to specify a minimum amount of entered chars before the remoteField sends a request, for example 3 chars.