How do you call a server side code and javascript in MVC? We are having a close button on every page. on click of close button there should be a call to controller action and the browser should close. Also if the user clicks the browse开发者_JAVA技巧r close the same controller action should be called before closing. Have anyone done similar stuff before
You need to implement an controller for that action. Javascript [ajax] call is a simple http-request, and you need to answer response as a json or xml. Google for an json serializer for java, there are many exists.
I can recommend you use jquery and google-json for this.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论