begin process at 2008 08 28 22:16:43
1 233 395 membres
487 nouveaux aujourd'hui
14 291 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

TRIER UNE LISTE LIÉES PAR 2 AUTRES LISTES À CHOIX MULTIPLE


Information sur la source

Catégorie :Formulaire Classé sous : liste, choixmultiple, dynamique Niveau : Initié Date de création : 23/02/2007 Vu : 2 641

Note :
1 / 10 - par 1 personne
1,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (2)
Ajouter un commentaire et/ou une note

Description

Trier une liste liée par 2 autres liste à choix multiples.

PS : je remercie Zobibol et PetoleTeam qui sans eux je ne serai pas arriver à ce résultat !

Fabiano13

Source

  • <HTML>
  • <HEAD>
  • <TITLE></TITLE>
  • <script type="text/javascript">
  • function Supprimer(_id, _type,_ids_1,_ids_2){
  • var ctrl = document.getElementById(_id);
  • if ( ctrl.listChilds == null){
  • ctrl.listChilds = new Array();
  • var ctrlsChilds = ctrl.getElementsByTagName("OPTGROUP");
  • for ( var i = 0; i < ctrlsChilds.length; i++){
  • var clone = ctrlsChilds[i].cloneNode(true);
  • clone._id = clone.id;
  • clone.id =null;
  • var childs = clone.getElementsByTagName ("OPTION");
  • for ( var j = 0; j< childs.length; j++){
  • childs[j]._id = childs[j].id;
  • childs[j].id = null;
  • }
  • ctrl.listChilds.push (clone );
  • }
  • }
  • var typeObj = ctrl.getElementsByTagName (_type);
  • var Lnids_1 = document.getElementById('sFonction').options.length
  • var Lnids_2 = document.getElementById('sSecteur').options.length
  • if((_ids_1.length==Lnids_1)||(_ids_1.length==0)){_ids_1="y".split(",");}
  • if((_ids_2.length==Lnids_2)||(_ids_2.length==0)){_ids_2="x".split(",");}
  • for ( var i =0 ; i < _ids_1.length; i++){
  • for ( var k = 0; k < _ids_2.length; k++){
  • for ( var j = 0; j < typeObj.length; j++){
  • if ((_ids_1[0]!="y")&&(_ids_2[0]!="x")){
  • if ( (typeObj[j].label_1 == _ids_1[i])||(typeObj[j].label_2 == _ids_2[k]) ){typeObj[j].parentNode.removeChild ( typeObj[j] );j--;}
  • }else if (_ids_1[0]=="y"){
  • if ( typeObj[j].label_2 == _ids_2[k] ){typeObj[j].parentNode.removeChild ( typeObj[j] );j--;}
  • }else if (_ids_2[0]=="x"){
  • if ( typeObj[j].label_1 == _ids_1[i] ){typeObj[j].parentNode.removeChild ( typeObj[j] );j--;}
  • }
  • }
  • }
  • }
  • }
  • function Reconstruire(_id){
  • var ctrl = document.getElementById(_id);
  • // réinitialise le composant.
  • ctrl.innerHTML = "";
  • // ajoute tous ces fils
  • for ( var i = 0; i < ctrl.listChilds.length; i++){
  • var ret = ctrl.appendChild ( ctrl.listChilds[i]) ;
  • // réattribut l'id
  • ret.id = ret._id;
  • // fais de même pour ces fils
  • for ( var j = 0; j < ret.childNodes.length; j++){
  • if ( ret.childNodes[j]._id != null )
  • ret.childNodes[j].id = ret.childNodes[j]._id;
  • }
  • }
  • ctrl.listChilds = null;
  • }
  • function Trier(){
  • var selectione_1="";
  • for (i=0; i<document.getElementById('sFonction').options.length; i++) {
  • if (!document.getElementById('sFonction').options[i].selected ) {
  • selectione_1 += "'" + document.getElementById('sFonction').options[i].label_1 + "',"; }
  • }
  • var selectione_2="";
  • for (i=0; i<document.getElementById('sSecteur').options.length; i++) {
  • if (!document.getElementById('sSecteur').options[i].selected ) {
  • selectione_2 += "'" + document.getElementById('sSecteur').options[i].label_2 + "',"; }
  • }
  • var sSelection_1 = selectione_1.substr(0,selectione_1.length - 1)
  • var sSelection_2 = selectione_2.substr(0,selectione_2.length - 1)
  • var ctrl = document.getElementById('sContact');
  • if ( ctrl.listChilds != null){Reconstruire('sContact')}
  • Supprimer('sContact','OPTION',eval("[" + sSelection_1 + "]"),eval("[" + sSelection_2 + "]"))
  • }
  • </script>
  • </HEAD>
  • <BODY>
  • <b>Fonction&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • Secteur d'activité&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • Contacts</b><br>
  • <select onchange="Trier();" size=47 id="sFonction" multiple>
  • <optgroup id="Direction" label="Direction" style="background-color:#FFFFAA">
  • <option label_1="label_1_" style="background-color:#FFFFAA">Président Directeur Général</option>
  • <option label_1="label_2_" style="background-color:#FFFFAA">Directeur Général</option>
  • </optgroup>
  • <optgroup id="Marketing" label="Marketing" style="background-color:#AAFFFF">
  • <option label_1="label_3_" style="background-color:#AAFFFF">Directeur Marketing</option>
  • <option label_1="label_4_" style="background-color:#AAFFFF">Chef Produit</option>
  • <option label_1="label_5_" style="background-color:#AAFFFF">Assitant Marketing</option>
  • <option label_1="label_6_" style="background-color:#AAFFFF">Responsable Licence</option>
  • </optgroup>
  • <optgroup id="PAO" label="PAO" style="background-color:#FFAAFF">
  • <option label_1="label_7_" style="background-color:#FFAAFF">Directeur de Création</option>
  • <option label_1="label_8_" style="background-color:#FFAAFF">Directeur Artistique</option>
  • <option label_1="label_9_" style="background-color:#FFAAFF">Graphiste</option>
  • </optgroup>
  • </select>
  • <select onchange="Trier();" size=47 id="sSecteur" multiple>
  • <optgroup id="Agro-Alimentaire" label="Agro-Alimentaire" style="background-color:#FF8A8A">
  • <option label_2="label_1_" style="background-color:#FF8A8A">Boisson</option>
  • <option label_2="label_2_" style="background-color:#FF8A8A">Biscuiterie</option>
  • </optgroup>
  • <optgroup id="Service" label="Service" style="background-color:#CAFF95">
  • <option label_2="label_3_" style="background-color:#CAFF95">Agence Communication</option>
  • <option label_2="label_4_" style="background-color:#CAFF95">Agence Conseil</option>
  • <option label_2="label_5_" style="background-color:#CAFF95">Agence Promotion</option>
  • <option label_2="label_6_" style="background-color:#CAFF95">Agence Créative</option>
  • </optgroup>
  • <optgroup id="Industrie" label="Industrie" style="background-color:#A8CBFF">
  • <option label_2="label_7_" style="background-color:#A8CBFF">Chimique</option>
  • <option label_2="label_8_" style="background-color:#A8CBFF">Pétrol</option>
  • <option label_2="label_9_" style="background-color:#A8CBFF">Papéterie</option>
  • </optgroup>
  • </select>
  • <select size=47 id="sContact" multiple>
  • <optgroup id="Client" label="Client" style="background-color:#D7EBFF">
  • <option label_1="label_3_" label_2="label_1_" id="id_1_" style="background-color:#D7EBFF">Guillermo Alcaide (Directeur Marketing - Boisson)</option>
  • <option label_1="label_4_" label_2="label_3_" id="id_2_" style="background-color:#D7EBFF">Thomas Leleu (Chef Produit - Agence Communication)</option>
  • <option label_1="label_2_" label_2="label_6_" id="id_3_" style="background-color:#D7EBFF">Alexandre Penaud (Directeur Général - Agence Créative)</option>
  • <option label_1="label_1_" label_2="label_3_" id="id_4_" style="background-color:#D7EBFF">Julien Obry (Président Directeur Général - Agence Communication)</option>
  • <option label_1="label_5_" label_2="label_8_" id="id_5_" style="background-color:#D7EBFF">Nathan Martinet (Assitant Marketing - Pétrol)</option>
  • <option label_1="label_3_" label_2="label_3_" id="id_6_" style="background-color:#D7EBFF">Laurent Bram (Directeur Marketing - Agence Communication)</option>
  • <option label_1="label_6_" label_2="label_5_" id="id_7_" style="background-color:#D7EBFF">Vincent Boginoff (Responsable Licence - Agence Promotion)</option>
  • <option label_1="label_1_" label_2="label_2_" id="id_8_" style="background-color:#D7EBFF">Mathieu Guenat (Président Directeur Général - Biscuiterie)</option>
  • <option label_1="label_8_" label_2="label_4_" id="id_9_" style="background-color:#D7EBFF">Jonathan Dahan (Directeur Artistique - Agence Conseil)</option>
  • <option label_1="label_2_" label_2="label_6_" id="id_10_" style="background-color:#D7EBFF">Christophe Lenzi (Directeur Général - Agence Créative)</option>
  • <option label_1="label_1_" label_2="label_5_" id="id_11_" style="background-color:#D7EBFF">Adrien Gombocz (Président Directeur Général - Agence Promotion)</option>
  • <option label_1="label_9_" label_2="label_1_" id="id_12_" style="background-color:#D7EBFF">Romain Sichez (Graphiste - Boisson)</option>
  • <option label_1="label_5_" label_2="label_2_" id="id_13_" style="background-color:#D7EBFF">Nicolas Tholozan (Assitant Marketing - Biscuiterie)</option>
  • </optgroup>
  • <optgroup id="Utilisateur" label="Utilisateur" style="background-color:#DED8E9">
  • <option label_1="label_3_" label_2="label_4_" id="id_14_" style="background-color:#DED8E9">Antoine Hamard (Directeur Marketing - Agence Conseil)</option>
  • <option label_1="label_2_" label_2="label_3_" id="id_15_" style="background-color:#DED8E9">Alexis Klegou (Directeur Général - Agence Communication)</option>
  • <option label_1="label_7_" label_2="label_7_" id="id_16_" style="background-color:#DED8E9">Vincent Dubosclard (Directeur de Création - Chimique)</option>
  • <option label_1="label_1_" label_2="label_1_" id="id_17_" style="background-color:#DED8E9">Luca Rovetta (Président Directeur Général - Boisson)</option>
  • <option label_1="label_8_" label_2="label_2_" id="id_18_" style="background-color:#DED8E9">Robert Khoury (Directeur Artistique - Biscuiterie)</option>
  • <option label_1="label_4_" label_2="label_6_" id="id_19_" style="background-color:#DED8E9">Arthur Surreaux (Chef Produit - Agence Créative)</option>
  • <option label_1="label_6_" label_2="label_1_" id="id_20_" style="background-color:#DED8E9">Hakim Rezgui (Responsable Licence - Boisson)</option>
  • <option label_1="label_3_" label_2="label_5_" id="id_21_" style="background-color:#DED8E9">Laurent Bondaz (Directeur Marketing - Agence Promotion)</option>
  • <option label_1="label_3_" label_2="label_2_" id="id_22_" style="background-color:#DED8E9">Thomas van Cauter (Directeur Marketing - Biscuiterie)</option>
  • <option label_1="label_9_" label_2="label_1_" id="id_23_" style="background-color:#DED8E9">Boris Obama (Graphiste - Boisson)</option>
  • <option label_1="label_7_" label_2="label_8_" id="id_24_" style="background-color:#DED8E9">Yannick Thomet (Directeur de Création - Pétrol)</option>
  • <option label_1="label_1_" label_2="label_9_" id="id_25_" style="background-color:#DED8E9">Benoit Bottero (Président Directeur Général - Papéterie)</option>
  • <option label_1="label_5_" label_2="label_9_" id="id_26_" style="background-color:#DED8E9">Benjamin Cselenko (Assitant Marketing - Papéterie)</option>
  • <option label_1="label_1_" label_2="label_4_" id="id_27_" style="background-color:#DED8E9">Hugo Vouillat (Président Directeur Général - Agence Conseil)</option>
  • <option label_1="label_6_" label_2="label_3_" id="id_28_" style="background-color:#DED8E9">Kristof de Leeuw (Responsable Licence - Agence Communication)</option>
  • <option label_1="label_4_" label_2="label_8_" id="id_29_" style="background-color:#DED8E9">Mark de Jong (Chef Produit - Pétrol)</option>
  • <option label_1="label_2_" label_2="label_5_" id="id_30_" style="background-color:#DED8E9">Sliman Taghzouit (Directeur Général - Agence Promotion)</option>
  • <option label_1="label_9_" label_2="label_7_" id="id_31_" style="background-color:#DED8E9">Boris Oumow (Graphiste - Chimique)</option>
  • <option label_1="label_7_" label_2="label_1_" id="id_32_" style="background-color:#DED8E9">Teddy Ranghella (Directeur de Création - Boisson)</option>
  • </optgroup>
  • <optgroup id="Visiteur" label="Visiteur" style="background-color:#FFD393">
  • <option label_1="label_5_" label_2="label_9_" id="id_33_" style="background-color:#FFD393">Konstantinos Kalaitzis (Assitant Marketing - Papéterie)</option>
  • <option label_1="label_2_" label_2="label_8_" id="id_34_" style="background-color:#FFD393">Yannick Thivant (Directeur Général - Pétrol)</option>
  • <option label_1="label_1_" label_2="label_6_" id="id_35_" style="background-color:#FFD393">Bilo Katis (Président Directeur Général - Agence Créative)</option>
  • <option label_1="label_7_" label_2="label_3_" id="id_36_" style="background-color:#FFD393">Benoit Viant(Directeur de Création - Agence Communication)</option>
  • <option label_1="label_3_" label_2="label_6_" id="id_37_" style="background-color:#FFD393">Gérôme Landin (Directeur Marketing - Agence Créative)</option>
  • <option label_1="label_2_" label_2="label_5_" id="id_38_" style="background-color:#FFD393">Didier Ouzer (Directeur Général - Agence Promotion)</option>
  • <option label_1="label_6_" label_2="label_4_" id="id_39_" style="background-color:#FFD393">Armando Gijon (Responsable Licence - Agence Conseil)</option>
  • <option label_1="label_2_" label_2="label_2_" id="id_40_" style="background-color:#FFD393">Daniel Cousin (Directeur Général - Biscuiterie)</option>
  • </optgroup>
  • </select></BODY></HTML>
<HTML>
<HEAD>
<TITLE></TITLE>
<script type="text/javascript">
            
function Supprimer(_id, _type,_ids_1,_ids_2){
  var ctrl = document.getElementById(_id);
    if ( ctrl.listChilds == null){
            ctrl.listChilds = new Array();
            var ctrlsChilds = ctrl.getElementsByTagName("OPTGROUP");
            for ( var i = 0; i < ctrlsChilds.length; i++){
                    var clone = ctrlsChilds[i].cloneNode(true);
                    clone._id = clone.id;
                    clone.id =null;
                    var childs = clone.getElementsByTagName ("OPTION");
                    for ( var j = 0;  j< childs.length; j++){
                            childs[j]._id = childs[j].id;
                            childs[j].id = null;
                    }
                    ctrl.listChilds.push (clone );
            }
    }
  var typeObj = ctrl.getElementsByTagName (_type);
  var Lnids_1 = document.getElementById('sFonction').options.length
  var Lnids_2 = document.getElementById('sSecteur').options.length
  
  if((_ids_1.length==Lnids_1)||(_ids_1.length==0)){_ids_1="y".split(",");}
  if((_ids_2.length==Lnids_2)||(_ids_2.length==0)){_ids_2="x".split(",");}

   for ( var i =0 ; i < _ids_1.length; i++){
      for ( var k = 0; k < _ids_2.length; k++){
        for ( var j = 0; j < typeObj.length; j++){

if ((_ids_1[0]!="y")&&(_ids_2[0]!="x")){
  if ( (typeObj[j].label_1 == _ids_1[i])||(typeObj[j].label_2 == _ids_2[k]) ){typeObj[j].parentNode.removeChild ( typeObj[j] );j--;}
}else if (_ids_1[0]=="y"){
  if ( typeObj[j].label_2 == _ids_2[k] ){typeObj[j].parentNode.removeChild ( typeObj[j] );j--;}
}else if (_ids_2[0]=="x"){
  if ( typeObj[j].label_1 == _ids_1[i] ){typeObj[j].parentNode.removeChild ( typeObj[j] );j--;}
}

         }
      }
   }
}

function Reconstruire(_id){
    var ctrl = document.getElementById(_id);
    // réinitialise le composant.
    ctrl.innerHTML = "";
    // ajoute tous ces fils
  for ( var i = 0; i < ctrl.listChilds.length; i++){
             var ret = ctrl.appendChild ( ctrl.listChilds[i]) ;
            // réattribut l'id
            ret.id = ret._id;
            // fais de même pour ces fils
            for ( var j = 0; j < ret.childNodes.length; j++){
                if ( ret.childNodes[j]._id != null )
                    ret.childNodes[j].id = ret.childNodes[j]._id;
            }
    }
    ctrl.listChilds = null;
}

function Trier(){
var selectione_1=""; 
for (i=0; i<document.getElementById('sFonction').options.length; i++) { 
if (!document.getElementById('sFonction').options[i].selected ) { 
      selectione_1 += "'" + document.getElementById('sFonction').options[i].label_1 + "',";  }
}

var selectione_2=""; 
for (i=0; i<document.getElementById('sSecteur').options.length; i++) { 
if (!document.getElementById('sSecteur').options[i].selected ) { 
      selectione_2 += "'" + document.getElementById('sSecteur').options[i].label_2 + "',";  }
}

var sSelection_1 = selectione_1.substr(0,selectione_1.length - 1)
var sSelection_2 = selectione_2.substr(0,selectione_2.length - 1)

var ctrl = document.getElementById('sContact');
if ( ctrl.listChilds != null){Reconstruire('sContact')}

Supprimer('sContact','OPTION',eval("[" + sSelection_1 + "]"),eval("[" + sSelection_2 + "]"))
}



</script>
</HEAD>
<BODY>
<b>Fonction&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Secteur d'activité&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Contacts</b><br>
<select onchange="Trier();" size=47 id="sFonction" multiple>
    <optgroup id="Direction" label="Direction" style="background-color:#FFFFAA">
        <option label_1="label_1_" style="background-color:#FFFFAA">Président Directeur Général</option>
        <option label_1="label_2_" style="background-color:#FFFFAA">Directeur Général</option>
    </optgroup>
    <optgroup   id="Marketing" label="Marketing" style="background-color:#AAFFFF">
        <option label_1="label_3_" style="background-color:#AAFFFF">Directeur Marketing</option>
        <option label_1="label_4_" style="background-color:#AAFFFF">Chef Produit</option>
        <option label_1="label_5_" style="background-color:#AAFFFF">Assitant Marketing</option>
        <option label_1="label_6_" style="background-color:#AAFFFF">Responsable Licence</option>
    </optgroup>
    <optgroup   id="PAO" label="PAO" style="background-color:#FFAAFF">
        <option label_1="label_7_" style="background-color:#FFAAFF">Directeur de Création</option>
        <option label_1="label_8_" style="background-color:#FFAAFF">Directeur Artistique</option>
        <option label_1="label_9_" style="background-color:#FFAAFF">Graphiste</option>
    </optgroup>
</select>
<select onchange="Trier();" size=47 id="sSecteur" multiple>
    <optgroup id="Agro-Alimentaire" label="Agro-Alimentaire" style="background-color:#FF8A8A">
        <option label_2="label_1_" style="background-color:#FF8A8A">Boisson</option>
        <option label_2="label_2_" style="background-color:#FF8A8A">Biscuiterie</option>
    </optgroup>
    <optgroup   id="Service" label="Service" style="background-color:#CAFF95">
        <option label_2="label_3_" style="background-color:#CAFF95">Agence Communication</option>
        <option label_2="label_4_" style="background-color:#CAFF95">Agence Conseil</option>
        <option label_2="label_5_" style="background-color:#CAFF95">Agence Promotion</option>
        <option label_2="label_6_" style="background-color:#CAFF95">Agence Créative</option>
    </optgroup>
    <optgroup   id="Industrie" label="Industrie" style="background-color:#A8CBFF">
        <option label_2="label_7_" style="background-color:#A8CBFF">Chimique</option>
        <option label_2="label_8_" style="background-color:#A8CBFF">Pétrol</option>
        <option label_2="label_9_" style="background-color:#A8CBFF">Papéterie</option>
    </optgroup>
</select>

<select size=47 id="sContact" multiple>
    <optgroup   id="Client" label="Client" style="background-color:#D7EBFF">
        <option label_1="label_3_" label_2="label_1_" id="id_1_" style="background-color:#D7EBFF">Guillermo Alcaide (Directeur Marketing - Boisson)</option>
        <option label_1="label_4_" label_2="label_3_" id="id_2_" style="background-color:#D7EBFF">Thomas Leleu (Chef Produit - Agence Communication)</option>
        <option label_1="label_2_" label_2="label_6_" id="id_3_" style="background-color:#D7EBFF">Alexandre Penaud (Directeur Général - Agence Créative)</option>
        <option label_1="label_1_" label_2="label_3_" id="id_4_" style="background-color:#D7EBFF">Julien Obry (Président Directeur Général - Agence Communication)</option>
        <option label_1="label_5_" label_2="label_8_" id="id_5_" style="background-color:#D7EBFF">Nathan Martinet (Assitant Marketing - Pétrol)</option>
        <option label_1="label_3_" label_2="label_3_" id="id_6_" style="background-color:#D7EBFF">Laurent Bram (Directeur Marketing - Agence Communication)</option>
        <option label_1="label_6_" label_2="label_5_" id="id_7_" style="background-color:#D7EBFF">Vincent Boginoff (Responsable Licence - Agence Promotion)</option>
        <option label_1="label_1_" label_2="label_2_" id="id_8_" style="background-color:#D7EBFF">Mathieu Guenat (Président Directeur Général - Biscuiterie)</option>
        <option label_1="label_8_" label_2="label_4_" id="id_9_" style="background-color:#D7EBFF">Jonathan Dahan (Directeur Artistique - Agence Conseil)</option>
        <option label_1="label_2_" label_2="label_6_" id="id_10_" style="background-color:#D7EBFF">Christophe Lenzi (Directeur Général - Agence Créative)</option>
        <option label_1="label_1_" label_2="label_5_" id="id_11_" style="background-color:#D7EBFF">Adrien Gombocz (Président Directeur Général - Agence Promotion)</option>
        <option label_1="label_9_" label_2="label_1_" id="id_12_" style="background-color:#D7EBFF">Romain Sichez (Graphiste - Boisson)</option>
        <option label_1="label_5_" label_2="label_2_" id="id_13_" style="background-color:#D7EBFF">Nicolas Tholozan (Assitant Marketing - Biscuiterie)</option>
    </optgroup>
    <optgroup   id="Utilisateur" label="Utilisateur" style="background-color:#DED8E9">
        <option label_1="label_3_" label_2="label_4_" id="id_14_" style="background-color:#DED8E9">Antoine Hamard (Directeur Marketing - Agence Conseil)</option>
        <option label_1="label_2_" label_2="label_3_" id="id_15_" style="background-color:#DED8E9">Alexis Klegou (Directeur Général - Agence Communication)</option>
        <option label_1="label_7_" label_2="label_7_" id="id_16_" style="background-color:#DED8E9">Vincent Dubosclard (Directeur de Création - Chimique)</option>
        <option label_1="label_1_" label_2="label_1_" id="id_17_" style="background-color:#DED8E9">Luca Rovetta (Président Directeur Général - Boisson)</option>
        <option label_1="label_8_" label_2="label_2_" id="id_18_" style="background-color:#DED8E9">Robert Khoury (Directeur Artistique - Biscuiterie)</option>
        <option label_1="label_4_" label_2="label_6_" id="id_19_" style="background-color:#DED8E9">Arthur Surreaux (Chef Produit - Agence Créative)</option>
        <option label_1="label_6_" label_2="label_1_" id="id_20_" style="background-color:#DED8E9">Hakim Rezgui (Responsable Licence - Boisson)</option>
        <option label_1="label_3_" label_2="label_5_" id="id_21_" style="background-color:#DED8E9">Laurent Bondaz (Directeur Marketing - Agence Promotion)</option>
        <option label_1="label_3_" label_2="label_2_" id="id_22_" style="background-color:#DED8E9">Thomas van Cauter (Directeur Marketing - Biscuiterie)</option>
        <option label_1="label_9_" label_2="label_1_" id="id_23_" style="background-color:#DED8E9">Boris Obama (Graphiste - Boisson)</option>
        <option label_1="label_7_" label_2="label_8_" id="id_24_" style="background-color:#DED8E9">Yannick Thomet (Directeur de Création - Pétrol)</option>
        <option label_1="label_1_" label_2="label_9_" id="id_25_" style="background-color:#DED8E9">Benoit Bottero (Président Directeur Général - Papéterie)</option>
        <option label_1="label_5_" label_2="label_9_" id="id_26_" style="background-color:#DED8E9">Benjamin Cselenko (Assitant Marketing - Papéterie)</option>
        <option label_1="label_1_" label_2="label_4_" id="id_27_" style="background-color:#DED8E9">Hugo Vouillat (Président Directeur Général - Agence Conseil)</option>
        <option label_1="label_6_" label_2="label_3_" id="id_28_" style="background-color:#DED8E9">Kristof de Leeuw (Responsable Licence - Agence Communication)</option>
        <option label_1="label_4_" label_2="label_8_" id="id_29_" style="background-color:#DED8E9">Mark de Jong (Chef Produit - Pétrol)</option>
        <option label_1="label_2_" label_2="label_5_" id="id_30_" style="background-color:#DED8E9">Sliman Taghzouit (Directeur Général - Agence Promotion)</option>
        <option label_1="label_9_" label_2="label_7_" id="id_31_" style="background-color:#DED8E9">Boris Oumow (Graphiste - Chimique)</option>
        <option label_1="label_7_" label_2="label_1_" id="id_32_" style="background-color:#DED8E9">Teddy Ranghella (Directeur de Création - Boisson)</option>
    </optgroup>
    <optgroup  id="Visiteur" label="Visiteur" style="background-color:#FFD393">
        <option label_1="label_5_" label_2="label_9_" id="id_33_" style="background-color:#FFD393">Konstantinos Kalaitzis (Assitant Marketing - Papéterie)</option>
        <option label_1="label_2_" label_2="label_8_" id="id_34_" style="background-color:#FFD393">Yannick Thivant (Directeur Général - Pétrol)</option>
        <option label_1="label_1_" label_2="label_6_" id="id_35_" style="background-color:#FFD393">Bilo Katis (Président Directeur Général - Agence Créative)</option>
        <option label_1="label_7_" label_2="label_3_" id="id_36_" style="background-color:#FFD393">Benoit Viant(Directeur de Création - Agence Communication)</option>
        <option label_1="label_3_" label_2="label_6_" id="id_37_" style="background-color:#FFD393">Gérôme Landin (Directeur Marketing - Agence Créative)</option>
        <option label_1="label_2_" label_2="label_5_" id="id_38_" style="background-color:#FFD393">Didier Ouzer (Directeur Général - Agence Promotion)</option>
        <option label_1="label_6_" label_2="label_4_" id="id_39_" style="background-color:#FFD393">Armando Gijon (Responsable Licence - Agence Conseil)</option>
        <option label_1="label_2_" label_2="label_2_" id="id_40_" style="background-color:#FFD393">Daniel Cousin (Directeur Général - Biscuiterie)</option>
    </optgroup>
</select></BODY></HTML>
  • signaler à un administrateur
    Commentaire de Mamoune2005 le 26/02/2007 13:10:56

    Dommage que ça ne marche que sous IE et donc assez inutilisable !

  • signaler à un administrateur
    Commentaire de PetoleTeam le 27/02/2007 17:21:21

    Bonjour,
    pour rendre compatible DOM en fait peut de chose à changer...
    il faut utiliser la méthode getAttribute() pour récuperer les label_1 et label_2
    la fonction Trier pourrait ressembler à cela

    function Trier(){
      var selectione_1="";
      var selectione_2="";
      var Obj = null;

      Obj = document.getElementById('sFonction');
      for (i=0; i< Obj.options.length; i++) {
        if(! Obj.options[i].selected ) {
          selectione_1 += "'" + Obj.options[i].getAttribute('label_1') + "',";
        }
      }

      Obj = document.getElementById('sSecteur');
      for (i=0; i< Obj.options.length; i++) {
        if (!Obj.options[i].selected ) {
          selectione_2 += "'" + Obj.options[i].label_2 + "',";  }
        }

    ...puis la suite...

    il faut faire de même dans la fonction Supprimer
    ;0)

Ajouter un commentaire

Pub



Appels d'offres

Recherche developpeur ...
Budget : 700€
SITE MARCHAND LOCATION...
Budget : 3 000€
SITE MARCHAND POUR HOTEL
Budget : 4 000€

CalendriCode

Août 2008
LMMJVSD
    123
45678910
11121314151617
18192021222324
25262728293031

VS Express FR Gratuit !

VS Express en français et 100% gratuit !

Téléchargements

Logiciels à télécharger sur le même thème :

Boutique

Boutique de goodies CodeS-SourceS