Hi,
Have you tried replacing $("#username").val() and $("#password").val() with
just "admin".
Maybe ajax request is getting invoked before initialising the data obj. I
guess there is no guarantee data is initialised first, right?Regards, Vinod Kavinda On Thu, Feb 26, 2015 at 4:04 PM, Mohammed Fawsan <[email protected]> wrote: > 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 > > -- Vinod Kavinda Software Engineer, *WSO2, Inc <http://www.wso2.com>.* Mobile : +94 (0) 712 415544 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
