Created
June 29, 2015 02:48
-
-
Save TheOpenDevProject/066cc73936e432539822 to your computer and use it in GitHub Desktop.
app.js
This file contains hidden or 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
MyApp = { | |
Events : { | |
CreateButton_Clicked : $(document).on("click",function(){ | |
$("#CreateButtonID").on("click",function(event){ | |
var PostDataASJson = { | |
Member : $("#inputid").val() | |
} | |
$.ajax({ | |
url: "/Url/To/Controller/", | |
type: 'POST', | |
dataType: 'html', | |
contentType: "application/json; charset=utf-8", | |
data: JSON.stringify(postData), | |
success: function (returnData) { | |
alert("It worked") | |
}, | |
error: function (jqXHR, textStatus, errorThrown) { | |
alert('epic fail'); | |
} | |
}); | |
}) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment