Another enhancement that seems like a good idea. This will allow us to define our own javascript handler when an item is selected.
For example, we could define our own javascript function like this:
var SubmitJump = function(sType, aArgs) {
document.jumpForm.submit();
}
And our jump form like this (notice
itemselecthandler
):
<form name="jumpForm" action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%">%AUTOCOMPLETE{ name="topic" datatopic="Sandbox.AutoCompletePluginTestData" datasection="topiclist" value="Jump" formname="jumpForm" class="twikiInputField patternFormFieldDefaultColor" onfocus="clearDefaultandCSS(this);" onblur="setDefaultText(this);" itemselecthandler="SubmitJump" size="128px" }%</form>
And our jump form will submit as soon as an item is selected, rather than having to hit enter twice.
--
TWiki:Main/AndrewRJones
- 16 Jul 2007