Please help! I upgraded to DynAPI 2.51, now keystroke in a text field
causes JavaScript error. I have modified the keystroke sample to show the
problem.
Thanks in advance for any help.
Paul
<!-- Starts here -->
<html>
<head>
<title>DynAPI Examples - Key Events</title>
<script language="Javascript" src="../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.event.*');
</script>
<script language="Javascript">
DynAPI.onLoad = function() {
myLayer = new DynLayer()
myLayer.setSize(400,80)
myLayer.setBgColor('#c0c0c0')
myLayer.moveTo(10,80)
myLayer.setHTML("Click in the textbox and it will crash in NS<FORM><INPUT
type='text'></INPUT></FORM>")
myListener = new EventListener(DynAPI.document)
myListener.onkeyup=function(e) {
if (e.charKey=='s') alert('You\'ve found the secret key')
if ((e.charKey>='a')&&(e.charKey<='z')) alert('You pressed the key with
keycode '+e.which+'.')
}
myListener.onkeydown=function(e) {
if (e.ctrlKey) { myLayer.moveBy(20,20);return true }
if (e.shiftKey) alert('SHIFT!')
}
DynAPI.document.addEventListener(myListener)
DynAPI.document.addChild(myLayer)}
</script>
</head>
<body bgcolor="#ffffff">
</body>
</html>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help