Witam mam mamy problem.
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()
{
count = document
.umowy
.elements
.length
; for (i
=0; i
< count; i
++) {
if(document.umowy.elements[i].checked == 0)
{document.umowy.elements[i].checked = 1; }
}
}
function UncheckAll(){
count = document
.umowy
.elements
.length
; for (i
=0; i
< count; i
++) {
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 '<td>'.$umowa_kod.'</td>'; echo '<td>'.$klient_imie.'</td>'; echo '<td>'.$klient_ulica.'</td>'; echo '<td>'.$wlasciciel_imie.' </td>'; echo '<td>'.$klient_data_zawarcia.' | '.$klient_godzina_zawarcia.'</td>'; echo '<td class="edytuj_td">'; echo '<a href="spisumow.php?umowa_id='.$umowa_id.'&akcja=edytuj">Edytuj</a>'; //echo '<form></form>';
echo '<td><form name="usun_umowe" method="post" action="usun_umowe.php">'; 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 '<td class="edytuj_td">'; echo '<form name="zatwierdz_umowe" method="post" action="spisumow.php">'; echo '<input type="hidden" name="zat_id" value="'.$umowa_id.'"><input type="hidden" name="widok" value="'.$widok.'">'; echo '<input type="submit" name="zatwierdz" value="Zatwierdz" '.$disabled.'></form>'; echo '<td class="edytuj_td">';
echo '<input type="checkbox" name="printboxes[]" value="'.$umowa_id.'">';
}
?>
</table>
<?php
break;
Moze ktos mi powiedziec o co chodzi ?
Ten post edytował gabcio 7.12.2006, 10:40:26