<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>How can I add an element to a select box</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=2 FACE="Arial">How can I add or delete an element from a Select Box using JavaScript ? i basically have two Select boxes (set to multiple), when I double click on select box 1, i need to add the element I double clicked on to box 2. If i double click on an element in box 2, then I need that element to be deleted. Here is the page that I have now that does not work.</FONT></P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;html&gt;</FONT>
</P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;head&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1252&quot;&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 4.0&quot;&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;meta name=&quot;ProgId&quot; content=&quot;FrontPage.Editor.Document&quot;&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;title&gt;New Page 1&lt;/title&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;script language=&quot;javaScript&quot;&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">function process_group(thisform,sAction)</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp;{</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; if (sAction == '1'){</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp;&nbsp;&nbsp; DataForm.D1.add (DataForm.D2.options[DataForm.D2.selectedIndex].value);</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; else</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp;&nbsp;&nbsp; DataForm.D1.remove(DataForm.D1.selectedIndex);</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">}</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;/script&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;/head&gt;</FONT>
</P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;body&gt;</FONT>
</P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;form method=&quot;post&quot; name=&quot;DataForm&quot; action=&quot;--WEBBOT-SELF--&quot;&gt;&lt;!--webbot bot=&quot;SaveResults&quot; U-File=&quot;fpweb:///_private/form_results.txt&quot;</FONT></P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; S-Format=&quot;TEXT/CSV&quot; S-Label-Fields=&quot;TRUE&quot; --&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &lt;p&gt;&lt;select size=&quot;1&quot; name=&quot;D1&quot;&nbsp; multiple ondblclick=&quot;process_group(this.document,'0')&quot; style=&quot;HEIGHT: 189px; WIDTH: 73px&quot;&gt;</FONT></P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &lt;/select&gt;&lt;select size=&quot;1&quot; name=&quot;D2&quot; ondblclick=&quot;process_group(this.document,'1')&quot; multiple style=&quot;HEIGHT: 144px; WIDTH: 90px&quot;&gt;</FONT></P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &lt;option value=&quot;a&quot;&gt;a&lt;/option&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &lt;option value=&quot;b&quot;&gt;b&lt;/option&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &lt;option value=&quot;c&quot;&gt;c&lt;/option&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &amp;nbsp;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&nbsp; &lt;/select&gt;&lt;input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;B1&quot;&gt;&lt;input type=&quot;reset&quot; value=&quot;Reset&quot; name=&quot;B2&quot;&gt;&lt;/p&gt;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;/form&gt;</FONT>
</P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;/body&gt;</FONT>
</P>

<P><FONT COLOR="#FF0000" SIZE=1 FACE="Arial">&lt;/html&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thx.</FONT>
</P>

</BODY>
</HTML>