checkbox

Question regarding jQuery click() function.

$('document').ready(function(){ $('[name=mycheckbox]').live('click', function(){ if($(this).is(':checked')) { alert('it is checked'); } else { alert('it is not checked'); } }); $('[name=mycheckbox]').click(...

Filtering more than one list item with "getElementsByTagName"?

How can I filter more than one list item with one checkbox? Thanks. <html> <head> <script type="text/javascript"> <!-- window.onload=function() { document.getElementById('onclick').onclick=function() { var check=document.getElementsByTagName('input'), lis=document.getElementsByTagName('li'),i=0; for(var i;i<check.lengt...

Dynamically adding checkboxes with PyQt4

I have a simple GUI built using python and PyQt4. After the user enters something into the program, the program should then add a certain number of checkboxes to the UI depending on what the user's input was. For testing purposes, I have one checkbox existing in the application from start, and that checkbox is nested inside of a QVBoxL...

Jquery capturing multiple form events in one line?

I have the following to capture the checkbox check event of form with id="form1": $('#form1 :checkbox').click(function() { var $this = $(this); alert($this.val()); } I now have another form (id="form2") with checkboxes for which I need to handle events. Is there any way to combine both forms into a single line and have the alert ...

how to check if a checkbox is checked, convert tobool fails since its lower case 'false'

I am doing: convert.toboolean(request.form["mycheckbox"] but since the value is 'false', it doesn't seem to cast to boolean. What should I do? I don't like checking for == "false" and then converting to boolean. is there a cleaner way? Update All I am doing is: if (Convert.ToBoolean(request.Form["somecheckbox"])) { } ...

WPF Toolkit DataGrid Checkbox Issues

I'm really hoping someone can help me out here. I have a DataGrid in my program that has a checkbox column. The ItemsSource for the DataGrid is a DataSet loaded programmatically. When I select a couple of items in the DataGrid and then scroll it, I get some very odd behavior. For example, when I check two of the CheckBoxes, it tells me t...

How to dynamically filter content using checkboxes? - jQuery

Hey all, I am trying to dynamically filter out content using checkboxes and jquery. Being new to jquery, I'm not sure on how to do this properly, so if any can help that would be great. I have got this code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"&gt;&lt;/script&gt; <script...

How to dynamically use checkbox to get data from mysql? - jquery

Hi all, I am new to jquery and php but I am trying to use a checkbox to grab stuff from a mysql database. To further explain, I want a checkbox and when checked it will place the id of the checkbox in a mysql query and display the results from the database. So, if I check off this box: <input name="apple" type="checkbox" id="apple" ...

Receive all values for input[] in array form in jQuery to send to PHP script

Hi there I am busy getting values on a form using jQuery to send to my PHP script. Well, most of my checkboxes have a name in the form of name="input[]" and so when I alert the value that gets returned in my form's submit() handler, it only returns the value of the first checkbox with that name. How can I return the values in array form...

javascript dynamic checkbox checking

I have a form (id="myForm") whose checkbox ("checkbox") I check/uncheck as follows: document.forms['myForm'].checkbox.checked = false; How can I do this dynamically? I.e. have a function where I pass in the name of the checkbox and then check or uncheck it? function check(name) { document.forms['myForm'].**name**.checked = false; /...

Merge two JavaScript scripts

I have two JavaScript code snippets. These perform specific task when an 'Update' button is clicked. I would like to merge them. Any help is appreciated. JavaScript 1: When the button is clicked, it checks if at least one checkbox is selected: function doUpdate(){ var c = document.getElementsByTagName('input'); for (var i = 0...

use of hidden field for checkboxes in cakePHP

What is the use of hidden fields for checkbox in cakePHP?? ...

Count the number of checked check-boxes and display them on a fixed div using jQuery

I'm trying to write a jQuery script (I have never written one before and I need help). The details are as following; I have a form with check-boxes. Each check-box has a different id and name which I will need for my own programming reasons. What I simply want is to count the number of check-boxes and simply display it on the right side ...

How can I put a "(de)select all" check box in an SWT Table header?

I have an SWT Table that I'm instantiating with the SWT.CHECK style in order to display a check box next to every row. My users have requested another check box in the header row of the table in order to allow them to select/deselect all the rows with one click. I can't see any obvious way to do it, and I've only found Swing/JTable e...

How to set value for checkbox via EmbeddedWB.FillForm ? (Delphi)

Hi , how can i set value for a checkbox via FillForm method ? I tried these but doesn't work : W.FillForm('Chkname', 'True'); W.FillForm('Chkname', '1'); W.FillForm('Chkname', '', 1); ...

jquery sum values of checkbox and place in adjacent td

How can I say in jQuery - Sum the "value" of all checkboxes within each div.checkboxes and put the summed value to the next ? <td> <div class=checkboxes> <LABEL style="white-space: nowrap;"> <INPUT type="checkbox" name="user_registered" class="checkbox1" value="14" > </LABEL><BR> <LABEL ...

jquery sselect checkbox1 when checkbox2 or checkbox3 are seleted

How can I say if you click on checkbox2 or checkbox3 and select one of them, then force checkbox1 to be selected as well $('input:checkbox').click(function() { if ($(this).attr('class') == 'checkbox2' || $(this).attr('class') == 'checkbox3') { if($(this).attr('checked',true)) { $(this).parent()..... } } }); <T...

ListView with checkbox

How do i on checkboxselected , show a toast that has data from database? Thank you. ...

asp.net mvc c# - how to use check box in view and get it's value in model?

Hello everybody, can I use it like this in View? <%= Html.CheckBoxFor(user => user.Role, "Administrator")%> and then just read a value of property in model if checkbox is checked: string role = user.Role; (role = "Administrator") Help me please! Take care, Ragims ...

Checkbox Problem "checked"

Hey, Problem with ASP.NET GriedView: When I click inside my GridView checkboxes and click "checked", set the record then delete remain in a post back the next checkbox still "checked". Although it has an entirely different ID. Is there any automatism ASP.NET? Sorry for my bad Englisch :-( Buts thanks for help :-) ...