I have the following code
var email = document.getElementById("email").value;
$.post("/valid",{emailadd: email},function(data){
alert(data);
});
on the server I have the following:
@RequestMapping(value = "/valid", method=RequestMethod.POST)
public @ResponseBody Boolean checkValidEmail(@RequestParam("emailadd") String emailadd){
return false;
}
Using firebug I can see that var email get the value but it skips past the alert function, what am i doing wrong?