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 5972749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:42:08+00:00 2026-05-22T20:42:08+00:00

On the order page, there is 3 buttons [New Order] [Processing] [Completed] If I

  • 0

On the order page, there is 3 buttons

[New Order] [Processing] [Completed]

If I click on the processing button – the background of the button should change. It will also update the order status to the database.

[New Order] button will have green background by default. If I click on the [Processing] button, the background-color will turn into green. [New Order] will no longer have a background-color.

What the best way dealing with this using Jquery Ajax?

  • 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-22T20:42:08+00:00Added an answer on May 22, 2026 at 8:42 pm

    Use jQuery’s css and get/post functions….

    HTML:

    <button class="button">New Order</button>
    <button class="button">Processing</button>
    <button class="button">Completed</button>
    

    CSS:

    button.button {
        background-color:#fff;
        border:thin solid #000;
    }
    button.button:first-child {
     background-color:green;   
    }
    

    JS:

    $(document).ready(function() {
        $("button.button").click(function() {
          $("button.button").css("background-color","#fff");
          $(this).css("background-color", "green");
            $.post("updateOrder.php", {orderStatus: $(this).text()}, function(data) {
               //database updated completion logic here 
            });
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've embedded a LinkedIn Apply Now button on my page . But there are
My page is a bulk order form that has many products and various size
In order to populate a textbox in a page header I am setting up
Looking at options for embedding the 3D Secure page inside my own order form,
I have been working on a dynamic page http://www.euroworker.no/order and I want my lovely
I'm building a payment page in asp.net, however the page where you order your
Does anyone know of a site or page, or know the order of execution
My query is essentially the following: entries=Entry.all().order(-votes).order(-date).filter(votes >, VOTE_FILTER).fetch(PAGE_SIZE+1, page* PAGE_SIZE) I want to
In my Default.aspx web page i use the following code in order to save
My checkout cart displays (1) an animation for Processing Order... after the 's been

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.