CORRECTION : The JS function looks like this.
$(function(){
$("#loginform").submit(function(e){
e.preventDefault();
// var data = $("#loginform").serialize();
var data = {"username" : $("#username").val(),"password"
: $("#password").val()};
alert(JSON.stringify(data));
$.ajax({
type: "POST",
url:
"http://10.100.4.135:9763/dashboardConfigs/dashBoardConfigs/login ",
data: data,
contentType: "application/json",
crossDomain : true,
dataType: "json",
success: function(data) {
alert("success" + JSON.stringify(data));
},
error:function(data){
alert('error : '+JSON.stringify(data));
}
});
});});
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev