This content has been marked as final.
Show 3 replies
-
1. Re: suggestionBox text search
ilya_shaikovsky Sep 15, 2008 6:00 AM (in response to dreuzel)1) you could check the String right in autocomplete method and avoid to query the db according to some your conditions.
2) If you want to work on client side - define your conditions in onsubmit attribute and return false if no request should be sent. -
2. Re: suggestionBox text search
dreuzel Sep 15, 2008 10:47 AM (in response to dreuzel)As I work on server side,
1)A packet will be ransmitted on every character entered
This is exactly what I want to avoid
2) onsubmit
would not be triggered inter request ????
I would like something like :<script> var token="?%*"; function onSearchKeyUp() { var inpField=event.getSource(); var len=inputField.length-1; if (token.indexOf(inpField.charAt(len))>-1) infField=inpField.substring(0,len); Call SuggestionBox(inpField); event.setSource(inputField); return false; } </script>
This would cause the server to be called only when assistance is required
Onsubmit will not do this -
3. Re: suggestionBox text search
ilya_shaikovsky Sep 16, 2008 5:54 AM (in response to dreuzel)2)
onsubmit="if !confirm('call suggestion?'){return false;}"
will cause cancel request.