one = 1; two = 1; tree = 1; four = 1; five = 1; function change(option) { column = document.getElementById('sel_column').value; ord = document.getElementById('sel_order').value; //alert("column-"+column+" ;order-"+ord); if (column == 'nom') { if (ord == 1){one = 2;} else if (ord == 2){one = 1;} } if (column == 'departement') { if (ord == 1){two = 2;} else if (ord == 2){two = 1;} } if (column == 'email') { if (ord == 1){tree = 2;} else if (ord == 2){tree = 1;} } if (column == 'depot') { if (ord == 1){four = 2;} else if (ord == 2){four = 1;} } if (column == 'etudiant') { if (ord == 1){five = 2;} else if (ord == 2){five = 1;} } if (option == 1) { params = "col=nom&order="+one; col = "nom"; order = one; //if (one == 2){one = 0;} //one ++; } if (option == 2) { params = "col=departement&order="+two; col = "departement"; order = two; /*if (two == 2){two = 0;} two ++;*/ } if (option == 3) { params = "col=email&order="+tree; col = "email"; order = tree; //if (tree == 2){tree = 0;} //tree ++; } if (option == 4) { params = "col=depot&order="+four; col = "depot"; order = four; //if (four == 2){four = 0;} //four ++; } document.location.href="https://portfolio.placedesinvestisseurs.org/liste_actionnaires.html?"+params; //alert (params); //frames["hidden_iframe"].location = "reload.php?"+params; } function clubs_change(option) { column = document.getElementById('club_sel_column').value; ord = document.getElementById('club_sel_order').value; //alert("column-"+column+" ;order-"+ord); if (column == 'clubs.name') { if (ord == 1){one = 2;} else if (ord == 2){one = 1;} } if (column == 'departement') { if (ord == 1){two = 2;} else if (ord == 2){two = 1;} } if (column == 'email') { if (ord == 1){tree = 2;} else if (ord == 2){tree = 1;} } if (column == 'depot') { if (ord == 1){four = 2;} else if (ord == 2){four = 1;} } if (column == 'etudiant') { if (ord == 1){five = 2;} else if (ord == 2){five = 1;} } if (option == 1) { params = "col=clubs.name&order="+one; col = "clubs.name"; order = one; //if (one == 2){one = 0;} //one ++; } if (option == 2) { params = "col=departement&order="+two; col = "departement"; order = two; /*if (two == 2){two = 0;} two ++;*/ } if (option == 3) { params = "col=email&order="+tree; col = "email"; order = tree; //if (tree == 2){tree = 0;} //tree ++; } if (option == 4) { params = "col=depot&order="+four; col = "depot"; order = four; //if (four == 2){four = 0;} //four ++; } if (option == 5) { params = "col=etudiant&order="+five; col = "depot"; order = five; } document.location.href="https://portfolio.placedesinvestisseurs.org/liste_clubs.html?"+params; //alert (params); //frames["hidden_iframe"].location = "reload.php?"+params; }