title: How to get checkbox value in AJAX
body: <p>I want to get the value of my checkbox in Ajax so that I can save it in database as a preference for each of my user. I've never done AJAX before so i'm quite lost about it.</p>
  
  <p>My javascript file :</p>
  
  <pre><code>$(document).ready -&gt;
  E.accounts.changeUnmarkVisibility()
  
  $('#letters-visibility').on 'click', (e) -&gt;
    E.accounts.changeUnmarkVisibility()
  
  $('#label-letters-visibility').on 'click', (e) -&gt;
    if $('#letters-visibility').is(':checked')
      $('#letters-visibility').prop('checked', false)
    else
      $('#letters-visibility').prop('checked', true)
  
    E.accounts.changeUnmarkVisibility()
  
  $('#letters-visibility').on 'change', (e) -&gt;
        $.ajax
          url: "/backend/accounts/{#id}"
          type: 'POST'
          data: 
            isChecked: $('#letters-visibility').is(':checked')
          success: (data, status, request) -&gt;
            console.log data
  
    E.accounts =
      changeUnmarkVisibility: -&gt;
        unmarkLines = $('.active-list .unmark').closest('tr')
  
    if unmarkLines.is(':visible')
      unmarkLines.hide()
    else
      unmarkLines.show()
  
  ) 
  </code></pre>
  
  <p>My post request send me back a 404 error, I think the error is in my 'Data' option</p>