<html>
<head>
<title>Abakada DHTML Demo: ondblclick Event Handler Example</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<script language="JavaScript">
<!--
function addItem ( ) {
if ( txtEntry.value.length == 0 ) alert ( "You have not entered any text." );
else {
sNewItem = new Option ( txtEntry.value );
selList.add ( sNewItem, -1 );
txtEntry.select ( );
}
}
//-->
</script>
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada DHTML Demo: <span class="hilite">ondblclick Event Handler</span> Example</h2></div>
<hr size=1 width=92%>
<center>
<p>The <b>ondblclick</b> event occurs when the user double-clicks on an object. </p>
<p>Enter some text and then double-click in the text box to add the input to the list box. </p>
<p><input type="text" id="txtEntry" name="txtEntry" ondblclick="addItem ( )">
<select id="selList" name="selList"></select></p>
</center>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>