HI
i have an applet included in my html page. The applet consist of a button
Button play
i want this button to be triggered on click of a enter key, i mean it to be clicked every time i hit enter
i tried
if (document.layers)
document.captureEvents(Event.KEYDOWN);
document.onkeydown = function (evt)
{ var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode;
alert(keyCode);
if (keyCode == 13) {
document.playAndRecordAll.stopRecording();
alert("hello");
return false;
}
else return true; };
but its not working, is there any thing internal in applet to do so?
Note: i found that if the focus is on the applet button then hitting space clicks it.