for me it seems impossible but expecting clarification on it. i am sending a request
as follow :
<form act开发者_如何学Cion="/name" method="get">
<input type="text" />
<input type="submit" />
</form>
Now action class at server side manipulates & send the response
to client, can i handle this response
by ajax
somehow ??
Yes, but you have to submit it via ajax (XmlHttpRequest) in order to be able to get the response that way.
Using jQuery makes this simple:
$.post("/name", {param:param}, function(data) {
});
In that example you should pass manually each form field as param. In case of bigger forms this is not that good. So you can use serialize():
$.post($("#yourForm").attr("action"),
$("#yourForm").serialize(),
responseHandlerFunction);
精彩评论