Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. var response= data;
  2. var container = document.createElement('div');
  3. var checkboxContainer = document.createElement('div');
  4. checkboxContainer.setAttribute('class', 'checkbox');
  5. var label;
  6. var checkBox;
  7.  
  8. for(i=0;i<response.length;i++){
  9. label = document.createElement('label');
  10. checkBox = document.createElement('input');
  11. checkBox.type = "checkbox";
  12. checkBox.name = "selDates[]";
  13. checkBox.value = response[i]['date'];
  14.  
  15. label.innerHTML = response[i]['date'] + " " + response[i]['typ'];
  16. label.appendChild(checkBox);
  17.  
  18. checkboxContainer.appendChild(label);
  19. container.appendChild(checkboxContainer);
  20. }
  21. $("#downloadContent").prepend(container);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement