Jquery returns internal server error
- by Chocol8
I am sure i am doing something bad here, but i cannot figure out what.
<script type="text/javascript">
$(function () {
$("li").bind("click", function () {
var sel = $(this).attr('id').toString();
$.ajax({
type: "POST",
contentType: "application/json",
data: sel,
url: "Default.aspx/SaveValue",
dataType: "text",
success: function (data) {
alert(data.d);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
debugger;
}
});
});
});
</script>
Any advises please?
And here is the debug info gathered