Hi,
if I understand you correctly, you can't. It is server side Javascript. That means it is executed on the server, not in the client. So the only thing you can do with SSJS is to print on the server console.
Alternatively, you could set a scoped variable (requestScope, sessionScope or something) in your SSJS and then in the onClientLoad event of the Xpages you can execute an alert with the content of the scoped variable. You can access serverside variables in clientside javascript with "#{javascript:sessionScope.test}" within your CSJS.
Hope this helps.
http://mnicklisch.wordpress.com