Hello!!!<br><br>Some time ago I posted here about trying to make some select box filtering based in another select box based in data stored in a mysql database. After days of googling I got a working code using CGI::Ajax module for Perl.
<br><br>Now I want to do something that made me be stuck again. I&#39;m trying to add/remove elements from a select box to another but Ajax always updates the entire destination select box erasing everything it already has. The CGI::Ajax module works mapping every Javascript function to a perl subroutine and every time an event occurs it calls a function and executes the subroutine instead. &quot;id&quot; properties indicate sources and destinations, where the data come from and where they are going to.
<br><br>Problem simulation:<br><br>- source select box contains: text_1 text_2 ... text_N (N elements)<br>- do a multiple selection selecting a range namely text_k ... text_k+m<br>- click in a &quot;add&quot; button that adds all selected elements from source to the destination select box
<br>- (oh I forgot to add some elements)<br>- select a new range and click add button again<br>- the new select is cleared and only the new selected ones are added to it (i know it happens because a new select is constructed and put inside the destination &quot;div&quot; tag again)
<br><br>How I can save the elements so that I could add them again to the destination select box????<br>What about removing???&nbsp; I didn&#39;t try it yet, but is it possible to use some kind of &quot;onkeypressed&quot; event and remove a range of elements (like pressing DEL key)?????
<br><br>Thanks!!!!<br clear="all"><br>-- <br>Henrique