I have the following Code on my Client
var value = {"userId":form.userId.value};
var xhrArgs = {
url : messageUrl,
handleAs : "text",
content: value,
load : displayMessages,
error : function(error) {
dojo.byId("displayArea").innerHTML = "Error aquiring messages";
}
};
dojo.xhrGet(xhrArgs);
}
And on my server side controller code
@RequestMapping(value = "/getMessages.htm", method = RequestMethod.GET)
public @ResponseBody String showMessageTable(@RequestParam("userId") String userId,ModelMap params)
{
I am getting a 400 error saying
The request sent by the client was syntactically incorrect ()
Could someone explain what i'm doing wrong? I have tested the dojo code with firebug and the value seems to be passing just fine. Thanks!
application/jsonshowMessageTablemethod.