JQuery/Javascript - Pull all checked contents and put into list -


We currently have a bunch of data from the database in which the user can indicate "check" that they Use. It is also prepared in such a way that if it is a returning user, then whatever is stored before it is checked onload. Since this list of data is long, it is difficult to tell which data has been selected, so what I want to do is check the location that has been checked on behalf of the side. It's not hard at first running, but I want to keep users updated and uncheck users and check other data.

While preparing the checkboxes I used, click to check for different boxes. I think the way to go is a function for the click event, which will add content that was clicked in the display list or it was removed. The main problems I have run with performance are:

  1. Javascript is scripted and this is the best way to add an entry for an array like this or remove it as soon as it goes.
  2. How to drag the contents of the checked data so that it can be added to the list.

Not sure how much this code snippet will help because this program has more information than just one area, an easy way to do this is that one with many entries containing many text entries The original checkbox is making and it is trying to print an array of entries already checked by me that are not worried about the code. Although any help is appreciated, Daniel

HTML for the field:

  & lt; Div id = "technologies" class = "scroll_fixed2" & gt; & Lt; Py: each = "items in technologies" & gt; & Lt; Input type = "checkbox" name = "technology []" id = "technologies_ $ item" value = "$ item" & gt; For label = "technologies_ $ item" & gt; $ Item & lt; / Label & gt; & Lt; / Input & gt; & Lt; Br / & gt; & Lt; / Py: for & gt; & Lt; / Div & gt;  

Javascript / juke so far:

  // Check previously selected items (items in technology_list) {$ ('input [id = \ 'Technological_' + $ .pace (technologicalist [item]) + '\'] '). Click (); }  

  var input = $ ('#inputs input: checkbox') // selects them inputs.trigger ('click') / var var value = inputs.map (function () {return..value}). Get () // assumes in an array  

You can use the input: checkbox: Checked for checked people .

If you want to select all the input of that element.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -