Attaching onKeyPressed event to Toolbar input

Hi there,

I’m trying to detect the enter key press in the toolbar input. Reading some of your previous posts I was able to get this far but the function never gets called.

Would you have any suggestions to get this working?

[code] var inputObj = toolbar1.objPull[toolbar1.idPrefix + “MyID”].obj.firstChild;

inputObj.attachEvent("onKeyPressed", function (key) {
	alert(key);
});[/code]

Thank you, I appreciate your help.

Hi,

inputObj.attachEvent(“onKeyPressed”, function (key) {
alert(key);
});

This approach can be applied to dhtmlxcombo. And inputObj is html input:

inputObj.onkeypress = function(e){ /*your code here*/ return true }