php - Open new window for multiple edit records -
what have here table displays record database. generates dynamic checkboxes along fetched record. need open new window using window.open, instead page go editor.php. gladly appreciated.
mysqli query
while ($row = $result1->fetch_assoc()) { <td><input name="checkbox[]" type="checkbox" id="checkbox[]" value="' . $row['id'] . '"'.($row['pr'] == ""?"disabled ":"").' style="cursor:pointer;" class="checkbox"></td> } javascript
<script type="text/javascript" language="javascript"> function setcheckboxes3(act) { $('.checkbox').not(':disabled').prop('checked', act == 1 ? true : false); //or $('.checkbox:not(:disabled)').prop('checked', act == 1 ? true : false) } </script> <script> jquery(function ($) { $('a.button.edit, a.button.remove').click(function () { if ($('input[name="checkbox[]"]:checked').length == 0) { return; } if ($(this).hasclass('edit')) { if (!confirm('edit record(s)?')) { return } } else { if (!confirm('warning !!! purchase order included in record(s) deleted.')) { return } } var frm = document.myform; if ($(this).hasclass('edit')) { frm.action = 'editpr.php'; } if ($(this).hasclass('remove')) { if (!confirm('are sure want continue?')) { return } } frm.submit(); }) }) </script> html
<a class="button edit" style="cursor:pointer;"><span><b>edit</b></span></a>
if script correct add in form
<form target="_blank" [....]
Comments
Post a Comment