Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6910397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:48:33+00:00 2026-05-27T08:48:33+00:00

I am using a third-party shopping cart from http://simplecartjs.com/ . For a normal checkout

  • 0

I am using a third-party shopping cart from http://simplecartjs.com/ .
For a normal checkout I can use:

<a href="javascript:;" class="simpleCart_checkout" >Checkout</a>

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:

me.addEventToArray( getElementsByClassName('simpleCart_checkout') , simpleCart.checkout , "click");

EDIT: and this:

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;
        }
    };

So I tried doing it using a button calling the method directly:

<asp:Button ID="CheckoutButton" runat="server" Text="Checkout" 
            onclick="CheckoutButton_Click" OnClientClick="Checkout()" />

            <script type="text/javascript">
                function Checkout() {

                    javascript: simpleCart.checkout;
                }    
                </script>

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:48:34+00:00Added an answer on May 27, 2026 at 8:48 am

    try this:

    <asp:Button ID="CheckoutButton" runat="server" Text="Checkout" 
                onclick="CheckoutButton_Click" OnClientClick="javascript:Checkout();" />
    
            <script type="text/javascript">
                function Checkout() {
    
                   simpleCart.checkout();
                   return true;
    
                }    
                </script>
    

    Edit:
    you want your scripts being called after the server event. then you’ll need to call your Checkout function at the end of “CheckoutButton_Click”.

    Page.ClientScript.RegisterStartupScript(Page.GetType(), "calling checkout", "<script>CheckOut();</script>", true);
    

    simpleCart.checkout() doesn’t got a chance to do redirect, as OnClientClick returns true and post back happens.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a third party shopping cart that sends a registration form to
We have a client that wants to use a third party shopping cart on
We are using a third-party COM API from NET. Currently Visual Studio & presumably
How can I detect keyboard event in C language without using third party libraries?
When using third-party libraries such as jquery, yui-reset, swfobject and so on, do you
What is the simplest way (preferably without using third party frameworks) in objective c,
Is it possible in IE8 without using third party plugin like Java?
Without using any third party program to do this (i.e. without VMware ThinApp, U3
We're using a third-party middleware product that allows us to write code in an
I'm using a third-party library that returns XML that is not valid, because it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.