Witam, jak zrobić aby po zaznaczeniu np pierwszego, trzeciego, piątego i dziesiątego wiersza w tabeli z selectu wybrać np usuń i te właśnie wiersze zostaną usunięte.
Mam coś takiego
echo '<th class=wiersze_tabeli_th width=3% scope=col><input type="checkbox" name="checkbox" id="checkbox" class="checkall"><label for="checkbox"></label></th>'; echo "<th class=wiersze_tabeli_th width=3% scope=col>Id</th>"; echo "<th class=wiersze_tabeli_th width=12% scope=col>Autor</th>"; echo "<th class=wiersze_tabeli_th width=15% scope=col>Data</th>"; echo "<th class=wiersze_tabeli_th width=13% scope=col>Tytuł</th>"; echo "<th class=wiersze_tabeli_th width=11% scope=col>Cel</th>"; echo "<th class=wiersze_tabeli_th width=5% scope=col>Status</th>"; echo "<th class=wiersze_tabeli_th width=5% scope=col>Wysweitlaj</th>"; echo "<th class=wiersze_tabeli_th width=5% scope=col>Wstrzymaj</th>"; echo "<th class=wiersze_tabeli_th width=5% scope=col>Usuń</th>"; echo "<th class=wiersze_tabeli_th width=5% scope=col>Edytuj</th>";
echo '<td class="wiersze_tabeli_td" scope="col"><input type="checkbox" name="checkbox2" id="checkbox2"><td>'; echo "<td class=wiersze_tabeli_td sscope=col>".$r['id_art']."</td>"; echo "<td class=wiersze_tabeli_td sscope=col>".$r['autor_article']."</td>"; echo "<td class=wiersze_tabeli_td sscope=col>".$r['datatime_art']."</td>"; echo "<td class=wiersze_tabeli_td sscope=col>".$r['title_art']."</td>"; echo "<td class=wiersze_tabeli_td sscope=col>".$r['dzial']."</td>"; echo "<td class=wiersze_tabeli_td sscope=col><img src=include/images/".$r['active_not'].".png></td>";
echo "<td class=wiersze_tabeli_td sscope=col><center><form method=post action=><input type=hidden name=ab value=aktywuj> <input type=image src=include/images/001_06.png name=idb value=".$r['id_art']."></form></center></td>";
Tu mam taki fragment odpowiadający zaznaczeniu wszystkich wierszy
echo '<th class=wiersze_tabeli_th width=3% scope=col><input type="checkbox" name="checkbox" id="checkbox" class="checkall"><label for="checkbox"></label></th>';
Ten fragment odpowiada za wysłanie danych do zmiennej opcją submit. Działa na jednym wierszu
echo "<td class=wiersze_tabeli_td sscope=col><center><form method=post action=><input type=hidden name=ab value=aktywuj> <input type=image src=include/images/001_06.png name=idb value=".$r['id_art']."></form></center></td>";
Poza tabelą dokładnie pod mam poniższy kod. Jaką mam możliwość co dokładnie muszę zrobić aby opcje z select działały na zaznaczone checkbox-y
Proszę o pomoc jak to rozwiązać.
<form name="szybkie_czynnosci" action="">
<select class="select_box_10" id="dzial_valid" name="ab" value="">
<option value="">Zaznaczone!</option>
<option value="usun">Usuń</option>
<option value="aktywuj_all">Aktywuj</option>
<option value="deaktywuj_all">Deaktywuj</option>
</select>
<td>
<div class="buttons">
<button type="submit" class="positive" value=>
<img src="images/icons/tick.png" alt=""/>Wykonaj</button>
<button type="reset" class="negative">
<img src="images/icons/cross.png" alt=""/>Anuluj</button>
</div>
</form>