Created
October 19, 2014 21:20
-
-
Save soelen/dcac9c4dbdf4259899e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$this->autoRender = false; | |
if($this->request->is('ajax')) | |
{ | |
$day = $this->request->data('day'); | |
$data = array( | |
'mister' => 'x', | |
'affe' => $day | |
); | |
return json_encode($data); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = { | |
'trainingLength' : 20, | |
'day' : 8, | |
'month' : 8, | |
'year' : 2014 | |
} | |
$.ajax "#{ma.url}programs/updateTrainingVisual", | |
success : (data, textStatus, jqXHR) -> | |
console.log data | |
error : (jqXHR, textStatus, errorThrown) -> | |
console.log 'error' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment