Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function cekdata()
- {
- var a=$('[form2.name="checkbox[]"]:checked').length;
- if(a==0)
- {
- alert("HARUS ADA YANG DICENTANG");
- }
- }
- </script>
- <script>
- function check(g,c) {
- var input=document.getElementsByClassName(g);
- for(i in input) if(!isNaN(i)) input[i].checked=c;
- }
- </script>
- </head>
- <body>
- <p>APPOVED BY MANAGEMENT</p>
- <p>Branch : <?php echo $_SESSION['cabang']; ?></p>
- <form id="form2" name="form2" method="POST" onsubmit="return cekdata()" action="<?php echo $editFormAction; ?>">
- <table width="1500" border="1">
- <tr>
- <td width="23">NO</td>
- <td width="77">AWB No</td>
- <td width="57">Airline</td>
- <td width="69">Book Date</td>
- <td width="200">Noted</td>
- <td width="30"><label for="all">ALL</label>
- <input type="checkbox" name="all" id="all" onclick="check('all',this.checked)" /></td>
- </tr>
- <?php
- $i=1;
- while ($row_aw = mysql_fetch_assoc($aw)) {
- echo"<tr>
- <td>".$i."</td>
- <td>".$row_aw['awb_no']."</td>
- <td>".$row_aw['air_code']."</td>
- <td>".$row_aw['tgl_book']."</td>
- <td>".nl2br(str_replace('','',htmlspecialchars($row_aw['note'])))."</td>
- <td><input type='checkbox' class='all' name='checkbox[]' id='checkbox' value='".$row_aw['id']."' /></td>
- </tr>";
- $i++;
- }
- $jum=$i-1;
- ?>
- </table>
- <p>
- <input type="submit" name="submit" id="submit" onclick="return tanya()" value="POSTING" />
- <input type="reset" name="reset" id="reset" value="RESET" />
- </p>
- <input type="hidden" name="n" value="<?php echo $jum; ?>">
- <input type="hidden" name="MM_insert" value="form2" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement