checkbox

Retrieve data from sql database and display in tables - Display certain data according to checkboxes checked

こ雲淡風輕ζ 提交于 2019-12-18 09:06:19
问题 I have created an sql database(with phpmyadmin) filled with measurements from which I want to call data between two dates( the user selects the DATE by entering in the HTML forms the "FROM" and "TO" date) and display them in a table. Additionally I have put, under my html forms, some checkboxes and by checking them you can restrict the amount of data displayed. Each checkbox represent a column of my database; so along with the date and hour column, anything that is checked is displayed(if

How to add a border to a checkbox and make it always visible

此生再无相见时 提交于 2019-12-18 08:59:16
问题 When I create my PDF the checkbox at first doesn't have any appearence. After I click on it (onBlur) there is some kind of shade visible and when it is focussed it isn't visible anymore. How can I make it always visible? And how can I add some kind of border (without doing it manually with a rectangle class)? public class CheckBoxWriter { public static void main(String[] args) throws IOException { PDDocument document = new PDDocument(); PDPage page = new PDPage(); document.addPage(page); //

Datagridview forcing only one checkbox to be selected in a column

百般思念 提交于 2019-12-18 08:59:10
问题 How do I force only a single checkbox to be checked in a column of a Datagridview? 回答1: You will have to subscribe for the CellValueChanged event of the grid and depending on the check state of the current cell, loop the DataGridView and set true/false as Value for the other cells. void grd_CellValueChanged(object sender, DataGridViewCellEventArgs e) { if ((sender as DataGridView).CurrentCell is DataGridViewCheckBoxCell) { if (Convert.ToBoolean(((sender as DataGridView).CurrentCell as

Setting value of unchecked checkbox php

谁说胖子不能爱 提交于 2019-12-18 07:18:54
问题 I have this form <tr> <td> <input type="hidden" name="po[]" value="<?php echo $ord['id'] ?>" /> <input type="hidden" name="acts[]" value="1" /> <input id="acts" value='2' type="checkbox" <?php echo $check ?> name="acts[]" /> </td> <td><img src="<?php echo $pnme['icon'] ?>" style="height: 25px; width: 25px; vertical-align: middle;" /><?php echo $pnme['name'] ?></td> <td><input id="per" style="background: #BDBDBD; width: 100px;" name="per[]" size="5" type="text" class="small" value="<?php echo

Select all checkboxes

烈酒焚心 提交于 2019-12-18 07:06:12
问题 In my Rails app I've created a set of checkboxes as follows: <div class="form_row"> <label for="features[]">Features:</label> <% ['scenarios', 'news', 'role_profiles', 'private_messages', 'chatrooms', 'forums', 'polls'].each do |feature| %> <br><%= check_box_tag 'features[]', feature, (@features || {}).include?(feature) %> <%= feature.humanize %> <% end %> </div> I'd like to know how to create a button that would "Select All". 回答1: Using jQuery; <script type="text/javascript"> function

javascript Hide/show div on checkbox: checked/unchecked

ぃ、小莉子 提交于 2019-12-18 07:02:33
问题 I am trying to make a function in javascript, that will hide / show particular div in my registration form, depending on the state of my checkbox (checked or not). Here is my function: function doruc() { var elem = document.getElementById('powermail_fieldwrap_331'); if (document.getElementById ('powermail_field_doruovaciaadresa2_1').checked) { elem.display='block'; } else {elem.display:none;} } It isnt working. I am checking and unchecking my checkbox, but nothing happens. Oh and one more

Spring Binding List<Object> to Form:checkboxes

馋奶兔 提交于 2019-12-18 05:54:28
问题 I can't seem to get my form to bind to the checkboxes control. I read many posts on here and tried a few techniques but no luck. Maybe a fresh set of eyes will help. my controller: public String editAccount(@RequestParam("id") String id, Model model) { model.addAttribute("account", accountService.getAccount(id)); model.addAttribute("allRoles", roleService.getRoles()); return EDIT_ACCOUNT; } my jsp: <form:form action="" modelAttribute="account"> <form:checkboxes items="${allRoles}" path="roles

jQueryUI accordion with checkboxes

99封情书 提交于 2019-12-18 05:50:49
问题 I'm trying to put a checkbox in each of my accordion headings to indicate whether something should be disabled or not. The checkbox shows up fine, however, its not clickable as the whole accordion header is linked to the <a> tag. Putting the checkbox outside the <a> tag makes the checkbox appear underneath the heading, which is not what I want, and it still isn't clickable either. <div id="accordion"> <h3><a href="#">Text <span id="id">More text<input type="checkbox"/></span></a></h3> <div

Checkbox Stays Checked on Page Refresh

不想你离开。 提交于 2019-12-18 05:48:10
问题 This a pretty simple question (I assume). Probably a repost, but I couldn't find the answer here... so here we go. I have a checkbox on a page that I want to default to "unchecked" (unless I specify otherwise in my php). When I refresh the page, if the box was checked, it will stay checked which is no-bueno because checking the box adds a dom element to my page via a function attached to the box. So the problem is if I refresh, the box is still checked, but the dom element doesn't exist

Jquery select all if not disabled

Deadly 提交于 2019-12-18 05:42:58
问题 I am using the following script to select all checkboxes with a given class. $(document).ready(function(){ // 1 // 2 $(':checkbox.selectall').on('click', function(){ // 3 $(':checkbox[class='+ $(this).data('checkbox-name') + ']').prop("checked", $(this).prop("checked")); $(':checkbox[class='+ $(this).data('checkbox-name') + ']').trigger("change"); }); }); However I'm having a problem as the de/select all checkbox is able to de/select checkboxes which are disabled. I tried this $(document)