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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:41:09+00:00 2026-05-25T01:41:09+00:00

I am working on a small project, it requires a few buttons that when

  • 0

I am working on a small project, it requires a few buttons that when you click on them it expand menus beneath them to show the user some options which they can select, however – how can I dynamically control the order of events?

For example: I need to select a colour before I can select a size and so on with more options.

EDIT:

Take this for example: http://www.notebookbuilder.co.uk

I have developed this (a long time ago), look at the functionality of this.

I want to be able to easily maintain this, because at the moment it’s an absolute nightmare to add and edit features.

As you can see you cannot move onto ‘the next level’ before you select your notebook size, then when you have selected your size the material option appears – but you cannot click on colour.

  • 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-25T01:41:10+00:00Added an answer on May 25, 2026 at 1:41 am

    If I understand correctly, you have, say, 5 “actions”, displayed on the same page at the same time, and you want to user to execute action 1 (for example, select a color) before being able to execute action 2 (for example, select a size).

    Create an array of size 5, put “false” in each element, when action 1 completes, put true in element 1 of the array, when the user clicks on action 2, check that the array element 1 is true before allowing the user to interact with it.

    If you want it even more mantainable and generic, use an object instead of an array, and use a label for each action (for example “color”, “size” etc..). If also allow you to make more complex checks (like, for example, if the user can select size and color in ay order, but must have chosen both before selecting payment method … could not find a better example :D). This way you can also give the user a feedback “You must select a color first”.

    Suppose the object where you keep which actions are completed is called “actions” :

    $('#buttonSize').click(function() {
        // Do whatever you need
        // ...
        actions['size'] = true;
    });
    
    $('#buttonColor').click(function() {
        // Check here
        if (!actions['size'] === true) {
            alert("Select a size first");
        }
        // Do whatever you need
        // ...
        actions['color'] = true;
    });
    

    And so on.

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

Sidebar

Related Questions

I'm working on a small project that requires some of our users to be
I am working on a small project in C++ that requires me to create
I am working on a small project that requires gridview paging for upto 100k
I am working on a small project that is receiving XML data in string
I'm working on a small project that involves me loading an image into a
i am working on a small project that i need the ability to let
I'm working on a small django project that will be deployed in a servlet
I'm working on a small Java project that now connects to a MS SQL
I am working on a project that requires the manipulation of enormous matrices, specifically
I am working on a small project which requires me to load images into

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.