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?

  1. <?php
  2. function CheckAll()
  3. {
  4. count = document.umowy.elements.length;
  5. for (i=0; i < count; i++)
  6. {
  7. if(document.umowy.elements[i].checked == 0)
  8. {document.umowy.elements[i].checked = 1; }
  9. }
  10. }
  11.  
  12. function UncheckAll(){
  13. count = document.umowy.elements.length;
  14. for (i=0; i < count; i++)
  15. {
  16. if(document.umowy.elements[i].checked == 1)
  17. {document.umowy.elements[i].checked = 0; }
  18. }
  19. }
  20. ?>



  1. <form action="spisumow.php" method="post">
  2. <input class="select_button" type="submit" name="widok" value="Wszystkie">&nbsp;
  3. <input class="select_button" type="submit" name="widok" value="Umowy z dzisiaj">&nbsp;
  4. <input class="select_button" type="submit" name="widok" value="Umowy z tego tygodnia">&nbsp;
  5. <input class="select_button" type="submit" name="widok" value="Umowy z tego miesiaca">
  6. </form>
  7.  
  8. <?php
  9. ?>

  1. switch ($widok) {
  2. case 'Wszystkie':
  3. $lp=0;
  4. $ww = mysql_query("select count(id) as ile from umowy");
  5. $r=mysql_fetch_object($ww);
  6. $ile = $r->ile;
  7.  
  8. $w = mysql_query("SELECT * FROM umowy order by id desc");
  9. ?>
  10. <br>
  11. <table class="umowa_table" align="center" width="100%" border="1" cellpadding="0" cellspacing="0">
  12. <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>
  13. <?php
  14.  
  15. $naglowek=10;
  16.  
  17. while ($r=mysql_fetch_object($w)) {
  18. $disabled = ($r->wyslane=='nie') ? '' : 'disabled';
  19.  
  20.  
  21. if ($naglowek==0) {
  22. 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>';
  23. $naglowek=10;
  24. }
  25. $naglowek--;
  26.  
  27. $lp++;
  28. $umowa_id = $r->id;
  29. $umowa_kod = $r->kod;
  30. $klient_imie = $r->imie_kl;
  31. $klient_ulica = $r->ulica_kl;
  32. $klient_data_zawarcia = $r->data;
  33. $klient_godzina_zawarcia = $r->godzina;
  34. $wlasciciel_imie = $r->wlas_imie;
  35. echo '<tr class="trnormal" onMouseOver="kolor(this)" onMouseOut="kolor(this)" onClick="trclick(this)">';
  36. echo '<td>'.$lp.'</td>';
  37. echo '<td>'.$umowa_kod.'</td>';
  38. echo '<td>'.$klient_imie.'</td>';
  39. echo '<td>'.$klient_ulica.'</td>';
  40. echo '<td>'.$wlasciciel_imie.'&nbsp;</td>';
  41. echo '<td>'.$klient_data_zawarcia.' | '.$klient_godzina_zawarcia.'</td>';
  42. echo '<td class="edytuj_td">';
  43. echo '<a href="spisumow.php?umowa_id='.$umowa_id.'&akcja=edytuj">Edytuj</a>';
  44. echo '</td>';
  45. //echo '<form></form>';
  46. echo '<td><form name="usun_umowe" method="post" action="usun_umowe.php">';
  47. echo '<input type="hidden" name="umowa_id" value="'.$umowa_id.'"><input type="hidden" name="widok" value="'.$widok.'">';
  48. echo '<input type="submit" name="usun" value="Usun" style="background-color: #de0000; font-weight: bold; color: #000;"></form></td>';
  49. echo '<td class="edytuj_td">';
  50. echo '<form name="zatwierdz_umowe" method="post" action="spisumow.php">';
  51. echo '<input type="hidden" name="zat_id" value="'.$umowa_id.'"><input type="hidden" name="widok" value="'.$widok.'">';
  52. echo '<input type="submit" name="zatwierdz" value="Zatwierdz" '.$disabled.'></form>';
  53. echo '</td>';
  54. echo '<td class="edytuj_td">';
  55.  
  56. echo '<input type="checkbox" name="printboxes[]" value="'.$umowa_id.'">';
  57.  
  58. echo '</td>';
  59. echo '</tr>';
  60. }
  61. echo '</form>';
  62. echo '</table>';
  63. ?>
  64. </table>
  65. <?php
  66. break;


Moze ktos mi powiedziec o co chodzi ?