Find what checkbox is checked in javascript

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Find what checkbox is checked in javascript

    I have to sets of checkboxes. The second is to delete the row. So when I
    click that checkbox I want to add it to an array. I also need to take it out
    of that array when if click it again. I need to do this clientside

    Dave


    dave Guest

  2. Similar Questions and Discussions

    1. Get Checkbox "Checked" value on form submit
      How do I get whether a checkbox is ticked in a form on a form's submission (true or false)? How do I use the Request object in ASP?
    2. Summarize values when checkbox is checked
      Hello all, The output of some query shows for example 10 records with invoice prices. Before each record is an unchecked checkbox. What I like to...
    3. DataGrid with CheckBox - How to read checked rows
      I have added a checkbox to a dataset that I bind to a datagrid: DataColumn colBoolean = new DataColumn ("chkBox"); colBoolean.DataType =...
    4. Saving checkbox states (checked or unchecked)?
      Hello. I'm creating a basic form with checkboxes for "yes/no". Is there a way for the state of the checkboxes to be saved by the user (using regular...
    5. Capturing checked event for Template based checkbox.
      Getting to grips with the datagrid better than I thought, however I've hit another problem which hopefully someone will be able to help (again.) ...
  3. #2

    Default Re: Find what checkbox is checked in javascript

    If I had a checkbox named X
    <input type=checkbox name=X checked>
    Then I would do
    if (X.checked == true)

    Randy
    [url]http://www.kbcafe.com[/url]

    Sample
    <SCRIPT LANGUAGE="JavaScript">
    function yo()
    {
    if (X.checked == true)
    {
    X.checked = false;
    }
    }
    </SCRIPT>

    <body>

    <input type=checkbox name=X checked/>
    <input type=button onclick="yo()"/>

    </body>


    "dave" <davef@helixpoint.com> wrote in message news:<OKfFF2usDHA.536@tk2msftngp13.phx.gbl>...
    > I have to sets of checkboxes. The second is to delete the row. So when I
    > click that checkbox I want to add it to an array. I also need to take it out
    > of that array when if click it again. I need to do this clientside
    >
    > Dave
    Randy Charles Morin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139