Search Results

Search found 2048 results on 82 pages for 'checkbox'.

Page 7/82 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How can I bind another DependencyProperty to the IsChecked Property of a CheckBox?

    - by speedmetal
    Here's an example of what I'm trying to accomplish: <Window x:Class="CheckBoxBinding.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <CheckBox Name="myCheckBox">this</CheckBox> <Grid> <Grid.Resources> <Style TargetType="ListBox"> <Style.Triggers> <Trigger Property="{Binding ElementName=myCheckBox, Path=IsChecked}" Value="True"> <Setter Property="Background" Value="Red" /> </Trigger> </Style.Triggers> </Style> </Grid.Resources> <ListBox> <ListBoxItem>item</ListBoxItem> <ListBoxItem>another</ListBoxItem> </ListBox> </Grid> </StackPanel> </Window> When I try to run it, I get this XamlParseException: A 'Binding' cannot be set on the 'Property' property of type 'Trigger'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject. So how can I bind a property on the ListBox to the IsChecked property of a CheckBox?

    Read the article

  • jQuery noobie can't make a checked checkbox show an alert.

    - by Kyle Sevenoaks
    I found this answer before, to fire an alert if the button is pressed but the checkbox isn't checked. Why won't this work? <input value="1" type="checkbox" name="salgsvilkar" ID="checkbox2" style="float:left;" onclick="document.getElementById('scrollwrap').style.cssText='border-color:#85c222; background-color:#E5F7C7;';" /><label for="checkbox2" class="akslabel">Salgs og leveringsvilkår er lest og akseptert</label> </span> {literal} <script type="text/javascript"> $(function() { //checkbox $("#checkbox2").click(function(){ //if this... //alert("this")... if($("#checkbox2").is(':checked')) { alert("im checked"); } }); //button $("#fullfor_btn").click(function(e){ if(!$("#checkbox2").is(':checked')) { alert("you did not check the agree to terms..."); e.preventDefault(); } }); } </script> {/literal} This on another .tpl: <label></label> <button type="submit" class="submit" name="{$method}" id="fullfor_btn" title="Fullfør bestillingen nå" value="">&nbsp;</button> What could be going wrong? The jQuery doesn't fire anything at all.

    Read the article

  • Disabling checkboxes based on selection of another checkbox in jquery

    - by Prady
    Hi, I want to disable a set of checkbox based on selection of one textbox and enable the disabled ones if the checkbox is unchecked. In the code below. If someone checks the checkbox for project cost under change this parameter then checkbox for project cost under Generate simulated value for this param should be disabled and all the checkboxes under change this parameter should be disabled except for checked one. Similarly this should be done each parameter like Project cost,avg hours,Project completion date, hourly rate etc. One way i could think of was of on the click function disable each checkbox by the id. Is there a better way of doing it? <table> <tr> <td></td> <td></td> <td>Change this parameter</td> <td>Generate simulated value for this param</td> </tr> <tr> <td>Project cost</td> <td><input type ="text" id ="pc"/></td> <td><input class="change" type="checkbox" name="chkBox" id="chkBox"></input></td> <td><input class="sim" type="checkbox" name="chkBox1" id="chkBox1"></input></td> </tr> <tr> <td>Avg hours</td> <td><input type ="text" id ="avghrs"/></td> <td><input class="change" type="checkbox" name="chkBoxa" id="chkBoxa"></input></td> <td><input class="sim" type="checkbox" name="chkBox1a" id="chkBox1a"></input></td> </tr> <tr> <td>Project completion date</td> <td><input type ="text" id ="cd"/></td> <td><input class="change" type="checkbox" name="chkBoxb" id="chkBoxb"></input></td> <td><input class="sim" type="checkbox" name="chkBox1b" id="chkBox1b"></input></td> </tr> <tr> <td>Hourly rate</td> <td><input type ="text" id ="hr"/></td> <td><input class="change" type="checkbox" name="chkBoxc" id="chkBoxc"></input></td> <td><input class="sim" type="checkbox" name="chkBox1c" id="chkBox1c"></input></td> </tr> </table> Thanks Prady

    Read the article

  • Excel vba -get ActiveX Control checkbox when event handler is triggered

    - by danoran
    I have an excel spreadsheet that is separated into different sections with named ranges. I want to hide a named range when a checkbox is clicked. I can do this for one checkbox, but I would like to have a single function that can hide the appropriate section based on the calling checkbox. I was planning on calling that function from the event_handlers for when the checkboxes are clicked, and to pass the checkbox as an argument. Is there a way to access the checkbox object that calls the event handler? This works: Sub chkDogsInContest_Click() ActiveSheet.Names("DogsInContest").RefersToRange.EntireRow.Hidden = Not chkMemberData.Value End Sub But this is what I would like to do: Sub chkDogsInContest_Click() Module1.Show_Hide_Section (<calling checkbox>) End Sub These functions are defined in a different module: 'The format for the the names of the checkbox controls is 'CHECKBOX_NAME_PREFIX + <name> 'where "name" is also the name of the associated Named Range Public Const CHECKBOX_NAME_PREFIX As String = "chk" 'The format for the the names of the checkbox controls is 'CHECKBOX_NAME_PREFIX + <name> 'where "name" is also the name of the associated Named Range Public Function CheckName_To_SectionName(ByRef strCheckName As String) CheckName_To_SectionName = Mid(strCheckName, CHECKBOX_NAME_PREFIX.Length() + 1) End Function Public Sub Show_Hide_Section(ByRef chkBox As CheckBox) ActiveSheet.Names(CheckName_To_SectionName(chkBox.Name())).RefersTo.EntireRow.Hidden = True End Sub

    Read the article

  • Find CheckBox from GridView in Content Page/Master Page

    - by Suthish Nair
    How to find a control from GridView which resides in Content Page Here the example using to find the CheckBox, hope this will help you all... .aspx code <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="chkID" runat="server" /> </ItemTemplate> </asp...(read more)

    Read the article

  • Create an Asp.net Gridview with Checkbox in each row

    - by ybbest
    One of the frequent requirements for Asp.net Gridview is to add a checkbox for each row and a checkbox to select all the items like the Gridview below. This can be easily achieved by using jQuery. You can find the complete source doe here. $(document).ready(function () { $(‘input[name$="CDSelectAll"]‘).click(function () { if ($(this).attr(“checked”)) { $(‘input[name$="CDSelect"]‘).attr(‘checked’, ‘checked’); } else { $(‘input[name$="CDSelect"]‘).removeAttr(‘checked’); } }); });

    Read the article

  • How to disable a checkbox based on date using php?

    - by udaya
    I have iterated a table based on my query result... I have a column lastDate it contains a date value like 01/24/2010... Now i have to check the date value with the current date if currentdate is less than or equal to lastDate i have to enable the checkbox else disable it..... Any suggestion how it can be done in php... Here is my code <? if(isset($comment)) { echo '<tr><td class=table_label colspan=5>'.$comment.'</td></tr>'; } ?> <td align="center" class="table_label" id="txtsubdat"> <? $dd=$row['dDate']; if($dd=='') { } else { $str = $dd; $dd = strtotime ( $str ); echo date ( 'm/d/Y' , $dd ); } ?> </td> <td align="center"> <input type="checkbox" name="group" id="group" value="<?=$row['dAssignment_id']?>" onclick="checkdisplay(this);"> </td> <? } ?>

    Read the article

  • jquery array checkbox

    - by text
    var others = $("#6"); others.click(function() { $('input:checkbox').attr('checked',false); $("#6").attr('checked',true); }); I have an array of check boxes which is drawn from database. I want to uncheck other check boxes when a certain check box is ticked in my case checkbox with id #6, and it uncheck a checkbox #6 if other checkbox is check. The code above is able to uncheck other checkbox but how can I uncheck the checkbox with id 6,once the other checkbox is check.

    Read the article

  • To change checkbox text or to not change?

    - by Axarydax
    Hi, I'm having an argument with a co-worker, and I'm trying to convince him that it's a bad idea to change checkbox text (label) according to the checkbox state. For example, we have a combobox that automatically picks selected value (and is disabled) when checkbox next to it is checked and is enabled when checkbox is cleared. His idea is to show Autoselect when checkbox is checked and Manual select when it's cleared. I'm sure that this will confuse the user as users tend to think that checking a checkbox next to a verb will make it true, only to find that the label has changed to something else. What is your opinion on this matter? P.S. I remember reading about changing checkbox text somewhere, in a book or blog article, but can't remember where. It would be great to have this in writing :-)

    Read the article

  • ASP.Net - Help with datagrid/checkboxes/double submit

    - by Gareth D
    We have a simple datagrid. Each row has a checkbox. The checkbox is set to autopostback, and the code-behind has an event handler for the checkbox check-changed event. This all works as expected, nothing complicated. However, we want to disable the checkboxes as soon as one is checked to prevent a double submit i.e. check box checked, all checkboxes are disabled via client side javascript, form submitted. To achieve this I we are injecting some code into the onclick event as follows (note that the alert is just for testing!): Protected Sub DgAccounts_ItemCreated(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DgAccounts.ItemCreated If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then Dim chk As CheckBox = CType(e.Item.FindControl("chkItemChecked"), CheckBox) chk.Attributes.Add("onclick", "alert('fired ...');DisableAllDataGridCheckBoxes();") End If End Sub When inspecting the source of the rendered page we get the following: <input id="DgAccounts__ctl2_chkItemChecked" type="checkbox" name="DgAccounts:_ctl2:chkItemChecked" onclick="alert('fired ...');DisableAllDataGridCheckBoxes();setTimeout('__doPostBack(\'DgAccounts$_ctl2$chkItemChecked\',\'\')', 0)" language="javascript" /> It all appears in order, however the server side event does not fire – I believe this is due to the checkbox being disabled, as if we just leave the alert in and remove the call to disable the checkbox it all works fine. Can I force the check-changed event to fire even though the check box is disabled?

    Read the article

  • create php form, show message depending user choice

    - by user1056615
    I want to create a php form with checkbox, like this: < form method="post> <input type="checkbox" name="formpractise[]" value="A" /> <br/> <br/> <input type="checkbox" name="formpractise[]" value="B" /> <br/> <br/> <input type="checkbox" name="formpractise[]" value="C" /> <br/> <br/> <input type="checkbox" name="formpractise[]" value="D" /> <br/> <br/> <input type="checkbox" name="formpractise[]" value="E" /> <br/> <br/> <input type="checkbox" name="formpractise[]" value="F" /> <br/> <br/> <input type="submit" name="formsubmit" value="Submit" /> </form> When the user select checkbox I want to print a message according user choice. Not the choice he made, a message depending his choice.

    Read the article

  • Changing the appearance of a custom android checkbox without the image scaling?

    - by Joren
    I have a custom checkbox with these attributes: android:id="@+id/map_toolbar_details" android:layout_width="80px" android:layout_height="106px" android:scaleType="center" macro:selectedResource="@drawable/map_toolbar_details_selected" android:button="@drawable/map_toolbar_details" When I load it up, the image gets stretched, even though it's set to scaleType center. If I set a background, I do not have this problem.

    Read the article

  • Cannot interact with checkbox in FireFox or Chrome. Works in IE.

    - by Darxide
    Title says it all. Here's the code: <div id="regpage"> <form action="" method="post"> <fieldset style="border:none;"> <div class="label">Username:</div> <input type="text" name="username" class="item" value="" /><br /> <div class="caption">Must be 5-15 characters</div><br /> <div style="clear:both;"></div> <div class="label">Password:</div> <input type="password" name="password" class="item" value="" /><br /> <div class="caption">Must be 6-20 characters</div><br /> <div style="clear:both;"></div> <div class="label">Email:</div> <input type="text" name="email" class="item" value="" /><br /> <div class="caption">Valid email address is required</div><br /> <div style="clear:both;"></div> <input name="terms" type="checkbox" id="terms" value="agree" /><div class="caption2"><label for="terms">I agree to the terms and conditions</label></div> <p><input type="submit" name="register" value="Register" id="register" style="float:left;border:1px solid #999;background:#E4E4E4;margin-top:5px;" /></p><br /> </fieldset> </form> </div> And the id "regpage" is definded in the style.css as: #regpage { width: 356px; height: 150px; color: #000000; font-family: "Tahoma", Arial, Helvetica, sans-serif; font-size: 13px; } If I move the checkbox OUT of it works just fine. But inside it will not interact in Mozilla. I've even tried adding onclick='this.checked="checked"' and it still does not interact. You can click until your blue in the face and nothing will happen. What's the deal! This is REALLY driving me batty.

    Read the article

  • Javascript: Dynamic Check box (Fieldset with Father/Child Checkboxes)

    - by BoDiE2003
    I have a problem here, when I select any of the 'father' checkboxes all the child checkboxes are getting enabled or disabled. So I need each father checkbox to affect it own child fieldset. Could someone help me with this. Thank you <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>toggle disabled</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> .cssDisabled { color: #ccc; } </style> <script src="http://prototypejs.org/assets/2009/8/31/prototype.js" type="text/javascript"> </script> <script type="text/javascript"> Event.observe(window, 'load', function(){ // for all items in the group_first class $$('.father').each(function(chk1){ // watch for clicks chk1.observe('click', function(evt){ dynamicCheckbox(); }); dynamicCheckbox(); }); }); function dynamicCheckbox (){ // count how many of group_first are checked, // doEnable true if any are checked var doEnable = ($$('.father:checked').length > 0) ? true : false; // for each in group_second, enable the checkbox, and // remove the cssDisabled class from the parent label $$('.child').each(function(item){ if (doEnable) { item.enable().up('label').removeClassName('cssDisabled'); } else { item.disable().up('label').addClassName('cssDisabled'); } }); }; </script> </head> <body> <fieldset> <legend>First Group</legend> <label><input type="checkbox" value="1" class="father" />Check box 1</label><br /> <label><input type="checkbox" value="2" class="father" checked/>Check box 2</label> </fieldset> <fieldset> <legend>Second Group</legend> <label class="cssDisabled"><input type="checkbox" value="x" class="child" disabled="disabled" />Check box x</label><br /> <label class="cssDisabled"><input type="checkbox" value="y" class="child" disabled="disabled" />Check box y</label><br /> <label class="cssDisabled"><input type="checkbox" value="z" class="child" disabled="disabled" />Check box z</label> </fieldset> <fieldset> <legend>First Group</legend> <label><input type="checkbox" value="3" class="father" />Check box 1</label><br /> </fieldset> <fieldset> <legend>Second Group</legend> <label class="cssDisabled"><input type="checkbox" value="x" class="child" disabled="disabled" />Check box x</label><br /> <label class="cssDisabled"><input type="checkbox" value="y" class="child" disabled="disabled" />Check box y</label><br /> <label class="cssDisabled"><input type="checkbox" value="z" class="child" disabled="disabled" />Check box z</label> </fieldset> </body> </html>

    Read the article

  • WinForms: Control ListView checkbox painting

    - by Telanor
    It seems that the checkbox used in a ListView when CheckBoxes = true isn't a proper checkbox. It doesn't draw the MouseOver or MouseDown state and it doesn't support the Indeterminate/Intermediate state. How can I replace the checkbox with a standard checkbox control or take control of the drawing of just the checkbox so I can use the CheckBoxRenderer class?

    Read the article

  • How to interact with checkbox actions ? (QTableView with QStandardItemModel)

    - by Claire Huang
    I'm using QTableView and QStandardItemModel to show some data. For each row, there is a column which has a check Box, this check box is inserted by setItem, the code is as follows: int rowNum; QStandardItemModel *tableModel; QStandardItem* __tmpItem = new QStandardItem(); __tmpItem->setCheckable(true); __tmpItem->setCheckState(Qt::Unchecked); tableModel->setItem(rowNum,0,__tmpItem); Now I want to interact with the check box. If a check box changes its state by user (from checked to unchecked or vice versa), I want to do something on the corresponding data row. I know I can use signal-slot to catch the change of checkbox, but since there are lots of data row, I don't want to connect each row one by one. Is there anyway to interact with the check action more effectively? Thanks :)

    Read the article

  • Silverlight 3.0 Custom ListBox DataTemplate has a checkbox, checked event not firing

    - by Bhaskar
    The datatemplate for the ListBox is set dynamically by XamlReader.Load. I am subscribing to Checked event by getting the CheckBox object using VisualTreeHelper.GetChild. This event is not getting fired Code Snippet public void SetListBox() { lstBox.ItemTemplate = XamlReader.Load(@"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' x:Name=""DropDownTemplate""><Grid x:Name='RootElement'><CheckBox x:Name='ChkList' Content='{Binding " + TextContent + "}' IsChecked='{Binding " + BindValue + ", Mode=TwoWay}'/></Grid></DataTemplate>") as DataTemplate; CheckBox chkList = (CheckBox)GetChildObject((DependencyObject)_lstBox.ItemTemplate.LoadContent(), "ChkList"); chkList.Checked += delegate { SetSelectedItemText(); }; } public CheckBox GetChildObject(DependencyObject obj, string name) { for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++) { DependencyObject c = VisualTreeHelper.GetChild(obj, i); if (c.GetType().Equals(typeof(CheckBox)) && (String.IsNullOrEmpty(name) || ((FrameworkElement)c).Name == name)) { return (CheckBox)c; } DependencyObject gc = GetChildObject(c, name); if (gc != null) return (CheckBox)gc; } return null; } How to handle the checked event? Please help

    Read the article

  • What sort of loop structure to compare checkbox matrix with Google Maps markers?

    - by Kirkman14
    I'm trying to build a map of trails around my town. I'm using an XML file to hold all the trail data. For each marker, I have categories like "surface," "difficulty," "uses," etc. I have seen many examples of Google Maps that use checkboxes to show markers by category. However these examples are usually very simple: maybe three different checkboxes. What's different on my end is that I have multiple categories, and within each category there are several possible values. So, a particular trail might have "use" values of "hiking," "biking," "jogging," and "equestrian" because all are allowed. I put together one version, which you can see here: http://www.joshrenaud.com/pd/trails_withcheckboxes3.html In this version, any trail that has any value checked by the user will be displayed on the map. This version works. (although I should point out there is a bug where despite only one category being checked on load, all markers display anyway. After your first click on any checkbox, the map will work properly) However I now realize it's not quite what I want. I want to change it so that it will display only markers that match ALL the values that are checked (rather than ANY, which is what the example above does). I took a hack at this. You can see the result online, but I can't type a link to it because I am new user. Change the "3" in the URL above to a "4" to see it. My questions are about this SECOND url. (trails_withcheckboxes4.html) It doesn't work. I am pretty new to Javascript, so I am sure I have done something totally wrong, but I can't figure out what. My specific questions: Does anyone see anything glaringly obvious that is keeping my second example from working? If not, could someone just suggest what sort of loop structure I would need to build to compare the several arrays of checkboxes with the several arrays of values on any given marker? Here is some of the relevant code, although you can just view source on the examples above to see the whole thing: function createMarker(point,surface,difficulty,use,html) { var marker = new GMarker(point,GIcon); marker.mysurface = surface; marker.mydifficulty = difficulty; marker.myuse = use; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); gmarkers.push(marker); return marker; } function show() { hide(); var surfaceChecked = []; var difficultyChecked = []; var useChecked = []; var j=0; // okay, let's run through the checkbox elements and make arrays to serve as holders of any values the user has checked. for (i=0; i<surfaceArray.length; i++) { if (document.getElementById('surface'+surfaceArray[i]).checked == true) { surfaceChecked[j] = surfaceArray[i]; j++; } } j=0; for (i=0; i<difficultyArray.length; i++) { if (document.getElementById('difficulty'+difficultyArray[i]).checked == true) { difficultyChecked[j] = difficultyArray[i]; j++; } } j=0; for (i=0; i<useArray.length; i++) { if (document.getElementById('use'+useArray[i]).checked == true) { useChecked[j] = useArray[i]; j++; } } //now that we have our 'xxxChecked' holders, it's time to go through all the markers and see which to show. for (var k=0; k<gmarkers.length; k++) { // this loop runs thru all markers var surfaceMatches = []; var difficultyMatches = []; var useMatches = []; var surfaceOK = false; var difficultyOK = false; var useOK = false; for (var l=0; l<surfaceChecked.length; l++) { // this loops runs through all checked Surface categories for (var m=0; m<gmarkers[k].mysurface.length; m++) { // this loops through all surfaces on the marker if (gmarkers[k].mysurface[m].childNodes[0].nodeValue == surfaceChecked[l]) { surfaceMatches[l] = true; } } } for (l=0; l<difficultyChecked.length; l++) { // this loops runs through all checked Difficulty categories for (m=0; m<gmarkers[k].mydifficulty.length; m++) { // this loops through all difficulties on the marker if (gmarkers[k].mydifficulty[m].childNodes[0].nodeValue == difficultyChecked[l]) { difficultyMatches[l] = true; } } } for (l=0; l<useChecked.length; l++) { // this loops runs through all checked Use categories for (m=0; m<gmarkers[k].myuse.length; m++) { // this loops through all uses on the marker if (gmarkers[k].myuse[m].childNodes[0].nodeValue == useChecked[l]) { useMatches[l] = true; } } } // now it's time to loop thru the Match arrays and make sure they are all completely true. for (m=0; m<surfaceMatches.length; m++) { if (surfaceMatches[m] == true) { surfaceOK = true; } else if (surfaceMatches[m] == false) {surfaceOK = false; break; } } for (m=0; m<difficultyMatches.length; m++) { if (difficultyMatches[m] == true) { difficultyOK = true; } else if (difficultyMatches[m] == false) {difficultyOK = false; break; } } for (m=0; m<useMatches.length; m++) { if (useMatches[m] == true) { useOK = true; } else if (useMatches[m] == false) {useOK = false; break; } } // And finally, if each of the three OK's is true, then let's show the marker. if ((surfaceOK == true) && (difficultyOK == true) && (useOK == true)) { gmarkers[i].show(); } } }

    Read the article

  • How to create Checkboxes that act like Radio buttons with Jquery

    - by hmloo
    I have a post here to show code examples for check/uncheck all checkbox with Jquery. This time I will implement another request that the user should only be able to check at most one of the checkboxes, it's behave like radio buttons. There are 2 cases. Case 1 shows function that has little difference with radio button. It allows the user to deselect checkbox. Case 2 is same as radio button. Case 1 <head id="Head1" runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <style type="text/css"> .cbRowItem {display:block;} </style> <script type="text/javascript"> $(document).ready(function() { var $chk = $('input:checkbox .cbRowItem'); $chk.click(function() { $chk.not(this).removeAttr('checked'); }); }); </script> </head> <body> <form id="form1" runat="server"> <div style="display:block;"> <asp:CheckBox id="CheckBox1" runat="server" class="cbRowItem" Text = "CheckBox 1"/> <asp:CheckBox id="CheckBox2" runat="server" class="cbRowItem" Text = "CheckBox 2"/> <asp:CheckBox id="CheckBox3" runat="server" class="cbRowItem" Text = "CheckBox 3"/> <asp:CheckBox id="CheckBox4" runat="server" class="cbRowItem" Text = "CheckBox 4"/> </div> </form> </body> </html> Case 2 <head id="Head1" runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <style type="text/css"> .cbRowItem {display:block;} </style> <script type="text/javascript"> $(document).ready(function() { var $chk = $('input:checkbox .cbRowItem'); $chk.click(function() { $chk.removeAttr('checked'); $(this).attr('checked', 'checked'); }); }); </script> </head> <body> <form id="form1" runat="server"> <div style="display:block;"> <asp:CheckBox id="CheckBox1" runat="server" class="cbRowItem" Text = "CheckBox 1"/> <asp:CheckBox id="CheckBox2" runat="server" class="cbRowItem" Text = "CheckBox 2"/> <asp:CheckBox id="CheckBox3" runat="server" class="cbRowItem" Text = "CheckBox 3"/> <asp:CheckBox id="CheckBox4" runat="server" class="cbRowItem" Text = "CheckBox 4"/> </div> </form> </body> </html>

    Read the article

  • How do I save the edits for a checkbox that implements an email notification?

    - by Ralph The Mouf
    On my site, a user gets email notifications when someone comments on their profile, or comments on their blog etc...I have made a email settings page that has checkboxes to allow the user to decide to receive emails or not. This is what I am wrapping around the email notification code chunck for the pages that have the php mail: <?php if(isset($_POST['email_toggle']) && $_POST['email_toggle'] == 'true') { if(isset($_POST['commentProfileSubmit']) && $auth) { $query etc $to = etc } } My question is what do I put on the email settings script that has the actual check boxes to make them stay checked or unchecked once you submit your settings? Another words what do I put in the if(isset portion to implement the changes? if(isset($_POST['email_toggle']) && $_POST['email_toggle'] == 'true') { /* what do I put here? */ header("Location: Profile.php?id=" . $auth->id); mysql_query($query,$connection); /* input/check boxes and submit button */ <tr> <td class="email_check"> <input type="checkbox" name="email_toggle" value="true" checked="checked" /> Receive email Notifications When Someone Answers A Question You've Answered </td> </tr> <tr> <td> <input style="margin:10px 0px 0px 10px;" class="submit" type="submit" name="email_toggle" value="Save Settings" /> </td> </tr> }

    Read the article

  • CheckBox in Gridview

    In this article you will know how to use the CheckBox inside Gridivew control and how to select the multiple checkboxes to get the selected CheckBoxes value will be displayed.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >