Napisalem fukncje do drukowania umow i teraz tak w firefoxie dziala zaznacza chectoxy przy kliknieciu zaznacz wszystkie w IE nie dziala a w firefoxie dziala
Czy ktos mi moze to wytlumaczyc?
<?php function CheckAll() { { if(document.umowy.elements[i].checked == 0) {document.umowy.elements[i].checked = 1; } } } function UncheckAll(){ { if(document.umowy.elements[i].checked == 1) {document.umowy.elements[i].checked = 0; } } } ?>
<form action="spisumow.php" method="post"> <input class="select_button" type="submit" name="widok" value="Wszystkie"> <input class="select_button" type="submit" name="widok" value="Umowy z dzisiaj"> <input class="select_button" type="submit" name="widok" value="Umowy z tego tygodnia"> <input class="select_button" type="submit" name="widok" value="Umowy z tego miesiaca"> </form> <?php ?>
switch ($widok) { case 'Wszystkie': $lp=0; $ww = mysql_query("select count(id) as ile from umowy"); $r=mysql_fetch_object($ww); $ile = $r->ile; $w = mysql_query("SELECT * FROM umowy order by id desc"); ?> <br> <table class="umowa_table" align="center" width="100%" border="1" cellpadding="0" cellspacing="0"> <tr><th bgcolor="#ececec">Lp.</th><th bgcolor="#ececec">Kod</th><th bgcolor="#ececec">Klient</th><th bgcolor="#ececec">Adres</th><th bgcolor="#ececec">Wlasciciel</th><th bgcolor="#ececec">Zawarta</th><th bgcolor="#ececec">Akcja</th><th bgcolor="#ececec">Usun</th><th bgcolor="#ececec">Wyslane</th><th bgcolor="#ececec">Drukuj<br>[<a href="#" onclick="CheckAll()">Zaznacz</a>]<br>[<a href="#" onclick="UncheckAll()">Odznacz</a>]</th></tr> <?php $naglowek=10; $disabled = ($r->wyslane=='nie') ? '' : 'disabled'; if ($naglowek==0) { echo '<tr><th bgcolor="#ececec">Lp.</th><th bgcolor="#ececec">Kod</th><th bgcolor="#ececec">Klient</th><th bgcolor="#ececec">Adres</th><th bgcolor="#ececec">Wlasciciel</th><th bgcolor="#ececec">Zawarta</th><th bgcolor="#ececec">Akcja</th><th bgcolor="#ececec">Usun</th><th bgcolor="#ececec">Wyslane</th><th bgcolor="#ececec">Drukuj<br>[<a href="#" onclick="CheckAll()">Zaznacz</a>]<br>[<a href="#" onclick="UncheckAll()">Odznacz</a>]</th></tr>'; $naglowek=10; } $naglowek--; $lp++; $umowa_id = $r->id; $umowa_kod = $r->kod; $klient_imie = $r->imie_kl; $klient_ulica = $r->ulica_kl; $klient_data_zawarcia = $r->data; $klient_godzina_zawarcia = $r->godzina; $wlasciciel_imie = $r->wlas_imie; echo '<tr class="trnormal" onMouseOver="kolor(this)" onMouseOut="kolor(this)" onClick="trclick(this)">'; //echo '<form></form>'; echo '<input type="hidden" name="umowa_id" value="'.$umowa_id.'"><input type="hidden" name="widok" value="'.$widok.'">'; echo '<input type="submit" name="usun" value="Usun" style="background-color: #de0000; font-weight: bold; color: #000;"></form></td>'; echo '<input type="hidden" name="zat_id" value="'.$umowa_id.'"><input type="hidden" name="widok" value="'.$widok.'">'; } ?> </table> <?php break;
Moze ktos mi powiedziec o co chodzi ?