How do I call my server functions synchronously or asynchronously?

For Jaxer 0.9.8 or later

When you designate a server-side function to be proxied, that is, callable from the browser, the function is replaced in the browser with a client function (or proxy): one with the same name as your original function is replaced by the following in the page sent to the browser:

This code will create the proxy function in the client. Now in your browser you can call getName('myname') as you would any other browser-side function, or call getName.async(callback,'myname') to make an asynchronous call that won't block your browser from doing other things while it goes to the server and returns with the data. Of course, that means that you need to tell getName.async what to do with the result once it returns, and for that you need a callback function on the browser:

For Jaxer 0.9.7 or earlier

When you designate a server-side function to be proxied, that is, callable from the browser, the function is replaced in the browser with two functions (proxies): one with the same name as your original function, and one with a suffix of "Async": is replaced by the following in the page sent to the browser:

Now in your browser you can call getName as you would any other browser-side function, or call getNameAsync to make an asynchronous call that won't block your browser from doing other things while it goes to the server and returns with the data. Of course, that means that you need to tell getNameAsync what to do with the result once it returns, and for that you need a callback function on the browser: