Javascript link with onClick event
<p>I am using a third-party shopping cart from <a href="http://simplecartjs.com/" rel="nofollow">http://simplecartjs.com/</a> .
For a normal checkout I can use:</p>

<pre><code>&lt;a href="javascript:;" class="simpleCart_checkout" &gt;Checkout&lt;/a&gt;
</code></pre>

<p>And it works. But I need to add some server-side functionality and don't know how to go about this. The code inside the javascript file where the simpleCart_Checkout class is stored is as follows:</p>

<pre><code>me.addEventToArray( getElementsByClassName('simpleCart_checkout') , simpleCart.checkout , "click");
</code></pre>

<p>EDIT: and this:</p>

<pre><code>me.checkout = function() {
        if( me.quantity === 0 ){
            error("Cart is empty");
            return;
        }
        switch( me.checkoutTo ){
            case PayPal:
                me.paypalCheckout();
                break;
            case GoogleCheckout:
                me.googleCheckout();
                break;
            case Email:
                me.emailCheckout();
                break;
            default:
                me.customCheckout();
                break;
        }
    };
</code></pre>

<p>So I tried doing it using a button calling the method directly:</p>

<pre><code>&lt;asp:Button ID="CheckoutButton" runat="server" Text="Checkout" 
            onclick="CheckoutButton_Click" OnClientClick="Checkout()" /&gt;

            &lt;script type="text/javascript"&gt;
                function Checkout() {

                    javascript: simpleCart.checkout;
                }    
                &lt;/script&gt;
</code></pre>

<p>Which calls the server-side but doesn't call the javascript link. I am new to asp.net and javascript so don't really know any other ways of how I can do this, please help.</p>
