I'd connect a key handler somewhere higher at the html hierarchy (perhaps at the containing div or form level) and do something like:
dojo.event.connect(dojo.byId('container'), 'onkeydown', function(e) { if (e.keyCode==13) // or use e.target to refine the condition for ENTER trapping dojo.event.browset.stopEvent(e); } ); On Thu, Feb 28, 2008 at 7:25 AM, Paul Stanton <[EMAIL PROTECTED]> wrote: > looking a bit deeper, the script for registering the onValueChanged > event looks like this: > > tapestry.cleanConnectWidget("addrSearch", "onValueChanged", > "formEvent1152711902"); > tapestry.formEvent1152711902=function(e){ > // do some stuff > }; > tapestry.connectWidget("addrSearch", "onValueChanged", > "formEvent1152711902");}); > > Does that mean I can do something similar to attach to a key event? like: > > tapestry.cleanConnectWidget("addrSearch", "onKeyPress", "checkMyKeyPress"); > tapestry.checkMyKeyPress = function(e){ > return e.keyCode != 10; > }; > tapestry.connectWidget("addrSearch", "onKeyPress", "checkMyKeyPress"); > > That doesn't work by the way, the event is never called, but is there a > way???? > > Thanks, Paul. > > > > Paul Stanton wrote: > > Hi all, > > > > I'm using the AutoCompleter component and noticed that hitting the > > enter key submits the form in IE. I've tried disabling keyCode 13 but > > since the component actually creates a select field, onkeypress, > > onkeydown and onkeyup are never triggered! > > > > Does anyone know of a way to disable enter key form submission on this > > component? > > > > Thanks, Paul. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]