ich leg dir ein file bei, da findest javascripts drinnen fuers
reinnehmen und entfernen von eintraegen, ich mache das ganze immer mit 2
listboxes. beide zusammen ergeben die summe der moeglichen sachen!

g.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas Beckert
Sent: Friday, June 20, 2003 12:44 PM
To: AspGerman Kaffeehaus
Subject: [Coffeehouse] listenfeld f�llen und leeren


hi liste -

ich habe mir folgende funktion geschrieben (bzw. bei selfhtml gezogen :)
),
um zu einer liste werte hinzuzuf�gen:

var Wert = 1;
function reinlegen()
{
 var position=null;
 if (document.all)
position=position=document.getElementsByName("warenkorb")[0].length;
 var Eintrag = document.createElement("option");
 Eintrag.text = document.form1.auswahl.value;
 Eintrag.value = Wert;
 Wert += 1;

 document.getElementsByName("warenkorb")[0].add(Eintrag,position);
}

wenn ich nun werte aus dieser liste wieder ausbekommen m�chte, wie mache
ich
das? bei selfhtml finde ich nichts zum remove-befehl, au�erdem muss da
wohl
die liste reorganisiert werden, wenn ich ein element z.b. einfach aus
der
mitte raus wegnehme, nicht?

und wo wir gerade dabei sind - wie bekomme ich mittels asp die werte aus
der
liste raus... geht das genau wie mit den checkboxen- sprich in eine
array
zerlegen etc ... ???


Thomas Beckert - SitePoint GbR

Vorstadtstr.57
66117 Saarbr�cken

Tel.: 0681 / 9 47 26 27
Fax: 0681 / 9 47 26 28

~~~~~~~~~~~~~~~~~~~~~~~~~~~sponsored by United Planet~~~~~~~~~~~~~~~~~
Kaffeepause im United Planet Communityserver ...
http://www.intrexx.com/communityserver                         
_______________________________________________
Coffeehouse mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/coffeehouse
<html>
<head>
<title>Benutzerrechteverwaltung</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="hufi edit (c) 2001">
<meta name="author" content="Guenther Haffner, [EMAIL PROTECTED]">
<meta http-equiv="expires" content="0">
<style type="text/css">
<!--
.normal {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; 
font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; 
color: #000000}
.smallnormal {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; 
font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; 
color: #000000}
.heading {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14pt; 
font-style: normal; font-weight: bold; color: #183963}
.subHead {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; 
font-weight: bold; color: #183963}
.loginbox { text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; 
font-size: 8pt; font-style: normal; font-weight: normal; COLOR: #000000}
.loginboxbold { text-decoration: none; font-family: Verdana, Arial, Helvetica, 
sans-serif; font-size: 8pt; font-style: normal; font-weight: bold; COLOR: #000000}
A:link {COLOR: #0000FF; TEXT-DECORATION: none }
A:visited {     COLOR: #0000FF; TEXT-DECORATION: none }
A:hover { COLOR: #FF0000; TEXT-DECORATION: underline }
.tdhead {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; 
font-weight: bold; color: #CCFF66; background-color: #333333}
.normalError {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; 
font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; 
color: #FF0000; background-color: #333333}
.tbflat  {
        font-size : 9pt;
        font-family : Verdana;
        border-width : 1;
        border-style : solid;
        border-color : #008080;
}

.cmdflat  {
        font-size : xx-small;
        font-family : Verdana;
        background-color : #483d8b;
        color : #ffffff;
        font-weight : bold;
        border-width : thin;
}
.rightTab {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; 
font-style: normal; font-weight: normal}
.dayOfferHeadline {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 
12pt; font-style: normal; font-weight: bold}
.dayOfferDesc {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; 
font-style: normal; font-weight: normal}
.normal {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; 
font-style: normal; font-weight: normal}
.normalBold {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; 
font-style: normal; font-weight: bold}
.headline {  font-family: Arial, Helvetica, sans-serif; font-size: 14pt; font-weight: 
bold; color: #183963}
.subHead {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; 
font-weight: bold; color: #183963}
.subsubhead {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; 
font-weight: normal; color: #183963}
a.lfontrot:link         { color: #FF3300; text-decoration:none}
a.lfontrot:visited      { color: #FF3300; text-decoration:none}
a.lfontrot:active       { color: #FF3300; text-decoration:none}
a.lfontrot:hover        { color: #0000FF; text-decoration:none}
-->
</style>

<script language="JavaScript">
function move(fbox, tbox) {
        var arrFbox = new Array();
        var arrTbox = new Array();
        var arrLookup = new Array();
        var i;
        for(i=0; i<tbox.options.length; i++) {
                arrLookup[tbox.options[i].text] = tbox.options[i].value;
                arrTbox[i] = tbox.options[i].text;
        }
        var fLength = 0;
        var tLength = arrTbox.length
        for(i=0; i<fbox.options.length; i++) {
                arrLookup[fbox.options[i].text] = fbox.options[i].value;
                if(fbox.options[i].selected && fbox.options[i].value != "") {
                        arrTbox[tLength] = fbox.options[i].text;
                        tLength++;
                } else {
                        arrFbox[fLength] = fbox.options[i].text;
                        fLength++;
                }
        }
        arrFbox.sort();
        arrTbox.sort();
        fbox.length = 0;
        tbox.length = 0;
        var c;
        for(c=0; c<arrFbox.length; c++) {
                var no = new Option();
                no.value = arrLookup[arrFbox[c]];
                no.text = arrFbox[c];
                fbox[c] = no;
        }
        for(c=0; c<arrTbox.length; c++) {
                var no = new Option();
                no.value = arrLookup[arrTbox[c]];
                no.text = arrTbox[c];
                tbox[c] = no;
        }
}

function sendInfo(formVar,box) {
    formVar.length = 0;
    var strValue = new String();
    for(var i=0; i<box.length; i++) {
        strValue += box[i].value;
        if (i < box.length-1) {
            strValue += ",";
        }
    }
    formVar.value = strValue;
}

</script>
</head>



<body bgcolor="#FFFFFF">
<p class="heading">Benutzerrechte
<p class="normal">&nbsp;</p>

<p class="normal"><a href="../einstieg.asp">Men&uuml;</a></p>
<table border="1" cellpadding="4" cellspacing="0" width="610">
        <tr>
                <td>
                        <form action="/admin/users/usergroupuserassoc.asp?ID=10" 
method="post" name="combo_box">
                        <table border="0" cellpadding="2" cellspacing="4">
                                <tr>
                                        <td class="normal">Benutzer:</td>
                                        <td colspan="3" class="tbflat">cliti
                                        </td>
                                </tr>
                                <tr>
                                        <td class="normal" 
valign="top">verf&uuml;gbare Rechte:</td>
                                        <td class="normal"><select name="list1" 
multiple size="10" class="tbflat">
<option value="5">Ausgabe/Inhaltsverzeichnis</option>
<option value="15">Ausgaben-Seite</option>
<option value="8">CMS-Benutzer</option>
<option value="14">Links</option>
<option value="3">Monatsaktion</option>
<option value="12">News</option>
<option value="11">Presseaussendung</option>
<option value="7">Statistik</option>
<option value="1">Termine</option>
<option value="6">Thema des Monats</option>
</select>
                                                
                                        </td>
                                        <td class="normal" valign="top">zugeteilte 
Rechte:</td>
                                        <td class="normal"><select name="list2" 
multiple size="10" class="tbflat">
<option value="4">Archiv</option>
<option value="16">Downloads</option>
<option value="13">Jugend</option>
<option value="9">Lokal</option>
<option value="10">Regional</option>
<option value="2">Startseite</option>
</select>
                                                
                                        </td>
                                </tr>
                                <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>
                                                <input type="button" 
onClick="move(this.form.list2,this.form.list1)" value="<<" id=button1 name=button1>
                                                <input type="button" 
onClick="move(this.form.list1,this.form.list2)" value=">>" id=button2 name=button2>
                                        </td>
                                        <td>&nbsp;</td>
                                </tr>
                                <tr>
                                        <td>&nbsp;</td>
                                        <td colspan="3">
                                        <input type="hidden" name="state_id" value="">
                                        <input type="submit" value="Speichern" 
name="submit" class="cmdflat"  
onClick="sendInfo(document.combo_box.state_id,document.combo_box.list2);"></td>
                                </tr>
                        </table>
                        </form>
                </td>
        </tr>
</table>
</body>
</html>

Antwort per Email an