You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by akash agrawal <ak...@yahoo.co.uk> on 2008/10/17 03:21:58 UTC
issue with autocompleter tag
Hi,
I am trying to attach javascript event onkeypress with autocompleter tag but can't. I can't seem to attach any event for that matter. Can anyone throw any light on it? Please find my code details below.
Thanks.
My code:
<s:autocompleter showDownArrow="false" id="textfield.configdi.search.name" theme="simple" forceValidOption="true" list="%{#configdinamelist}" name="configdiName" size="10" onkeypress="processKey(event);" cssClass="textBold"/>
Javascript:
<script type="text/javascript">
function processKey(e)
{
if (null == e)
e = window.event ;
if (e.keyCode == 13) {
document.searchform.submit();
}
}
</script>
On view source:
<select dojoType="struts:ComboBox" id="textfield.configdi.search.name" class="textBold" forceValidOption="true" name="configdiName" keyName="configdiNameKey" size="10" onkeypress="processKey(event);">
<option value="CCH-1">CCH-1</option>
<option value="CCH-2">CCH-2</option>
</select>
Using Firebug plugin this is what I see:
<input class="dojoComboBox textBold" type="text" dojoattachpoint="textInputNode" dojoattachevent="key:_handleKeyEvents; keyUp: onKeyUp; compositionEnd; onResize;" autocomplete="off" style=""/>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org