onKeyPress fails in Opera 9.25
Hi Alex,
The following code gives an alert with the key pressed in FireFox and IE.
However, there's no alert in Opera.
Regards,
Ankur
The following code gives an alert with the key pressed in FireFox and IE.
However, there's no alert in Opera.
Regards,
Ankur
<html>
<head>
<script src="runtime/lib/aw.js"></script>
<link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<script>
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setCellEditable(false);
obj.onKeyPress = function(event) {
var key = String.fromCharCode(event.keyCode || event.charCode);
alert(key);
}
document.write(obj);
</script>
</body>
</html>
Ankur Motreja
February 3,