Please follow this tutorial: http://decoding.wordpress.com/2008/11/14/aspnet-how-to-call-a-server-side-method-from-client-side-javascript/
On a sidenote: ASP.NET generates a client side javascript function that you can call from your own functions to perform the postback you want.
-- More info on hijacking the postback event: