There are two things you can do, one of which is what you mean, unless you're terminally confused about client/server separation.
- You want to run some client-side javascript as soon as the controller method 'returns', i.e. when the page is served. Answer: put an onload handler on the body element, or run some inline script in the view if getting at the body tag is a pain (i.e. if you're using a master page.)
- Or: You are calling this controller method in an AJAX request, and want the client code to do something as a result of what you return. By definition, an AJAX request is called from within JS and you can hook a JS function to act as a response handler, so construct some output in the controller method or view which tells the client what to do, and write the client script so that it looks in the AJAX response and does whatever it's asked to.