   near = currentTask.center
   challenge = currentChallenge.id
   task_id = currentTask.id
-  $.post "/c/#{challenge}/task/#{task_id}", payload, ->
-    setDelay 1, ->
+  request = $.ajax {
+    url: "/c/#{challenge}/task/#{task_id}",
+    type: "POST",
+    data: payload}
+  request.done(->
+    setDelay(1, ->
       clearTask()
-      getTask(near)
+      getTask(near)))
+  request.fail(ajaxErrorHandler)
 
 @openIn = (e) ->
   ###

      tileAttrib = data.tileasttribution if data.tileattribution?
      changeMapLayer(tileURL, tileAttrib)
    currentChallenge.help = markdown.makeHtml(currentChallenge.help)
    currentChallenge.doneDlg = makeDlg(currentChallenge.doneDlg)


enableKeyboardShortcuts = ->
  ###

  ###
  msg currentTask.text if currentTask.text

makeButton = (label, action) ->
  ###
  # Takes in a label and onclick action and returns a button div
  ###
  button = $('div').addClass("button")
  button.attr {onclick: action}
  button.content = label
  return button

makeDlg = (dlgData) ->
  ###
  # Takes dialog box data and returns a dialog box for nextUp actions
