Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <label class="checkbox">
- <input type="checkbox" id="user_ids_for_edit" name="user_ids_for_edit[]" data-toggle="checkbox" data-toggle="checkbox" value="14">Billy Joel
- </label>
- $.ajax({
- type: "GET",
- url: "/data/team_users",
- data: { id: data.id },
- cache: false,
- dataType: "json",
- success: function(response)
- {
- for (var user in response) {
- alert(response[user].id); // this gives the right user id, so my ajax call works...
- $('#user_ids_for_edit[value="'+ response[user].id +'"]').attr('checked', true);
- }
- }
- });
Add Comment
Please, Sign In to add comment