The only way to get back to the server side from the client side is to send something back, there are several methods of doing this :
1. Post the entire page
2. Post part of the page - e.g. a Frame/IFrame
3. Make a dynamic call to a
JS/XML file
If you function does not require server side processing, you could move it into client side scripting for example.