Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q848

irt.org | About | Feedback | 3939 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q848

Sent by
Miha Novak on June 11, 2002 at 06:47:51:

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
If you want to capture events also in for example combo box you can do it in this manner!

<HTML>
<HEAD>
<script language="Javascript">
function NS(e)
{
if (e.which == 13) {
window.alert("You have pressed return");}
}

function Author() {
window.alert("This script was contributed to the WWW by Miha Novak, Slovenia");
}

window.captureEvents(Event.KEYPRESS);
window.onkeypress = NS;
</script>
</HEAD>
<BODY >
<form name="test">
<select name="selection" onkeypress="Javascript:NS(event);">
<option>first option</option>
<option>second option</option>
<option>third option</option>
</select>

<input type="button" value="press" name="butt" onClick="Author()">
<input type="text" name="tfield" SIZE="20">

</form>
</BODY>
</HTML>



Other feedback on 'irt.org FAQ Knowledge Base Q848' - show all


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.