开发者

Invoke different server-side actions on clicking different buttons in a jquery dialog

Can I get which button is clicked开发者_Python百科 in the jquery dialog(if 'OK' is clicked or 'Cancel' is clicked) in my spring controller?? I am doing response.sendRedirect from the controller with a querystring, which i use to check for a condition to show the jquery dialog box. I need to return to this controller function with the value of which button is clicked. Is this possible???


It is possible. Use the jQuery ajax capabilities and invoke a controller method based on that. For example map one method as @RequestMapping("/foo/ok") and the other as /cancel, and invoke that URL with $.post(..)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜