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

  • Home
  • SEARCH
  • 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 6319991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:53:41+00:00 2026-05-24T15:53:41+00:00

I want to create a JavaScript/jQuery/jQuery UI drop-down select for element ordering in my

  • 0

I want to create a JavaScript/jQuery/jQuery UI drop-down select for element ordering in my CMS application. I have been using a form with a select element that posts when the select element changes, but I need to apply this functionality to form elements, and trying to nest forms creates all kinds of problems.

I was thinking that I could add an element like this in each element, and then build some sort of control from it:

<div class="order"
        data-action="[url to POST to]"
        data-return="[url to redirect to after POST]"
        data-max="[maximum order value, min assumed to be 1]">
    [value of current order]
</div>

I’ve done some searching, but haven’t found anything that resembles what I am looking for.


UPDATE

I have found this jQuery SelectBox plugin that looks nice, but it still requires the form elements to be in the source.

Starting with this markup:

<div class="order"
        data-action="/block/order"
        data-return="/p/1/home#block_1"
        data-max="3">
    1
</div>

I would expect the JavaScript to make something like this:

<div class="order"
        data-action="/block/order"
        data-return="/p/1/home#block_1"
        data-max="3">
    1
</div>
<ol class="orderSelect">
    <li class="selected">1</li>
    <li>2</li>
    <li>3</li>
</ol>

Using JavaScript/CSS to make it behave like a select element, making a POST request when another value is selected. I’m not looking for an AJAX solution.

I don’t expect a full solution, but a pointer in the right direction.

  • 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-24T15:53:43+00:00Added an answer on May 24, 2026 at 3:53 pm

    haha, it takes a long time for my code to build at work, so don’t worry about the length of my last idea! So, i’m imagining a page full of all kinds of your blocks, with different values:

        <div class="order"
            data-action="/block/order"
            data-return="/p/1/home#block_1"
            data-max="3">
         1
         </div>
    

    and you want these blocks to trigger JS to create ‘something’ like this:

    <ol class="orderSelect">
        <li class="selected">1</li>
        <li>2</li>
        <li>3</li>
    </ol>
    

    allright, the code below will point you in the correct direction on how to make the ‘ol’ blocks that you want.

        <script>
        $(document).ready(function(){
        //only clone() these un-attached elements, or var re-use may go out the window
          var masterContainerObj = $("<ol class='orderSelect'></ol>");
          var masterContainerItemObj = $("<li></li>");
        //get all your div objects that have the data we want
          $(".order").each(function(index, elem){
            var newContainer = masterContainerObj.clone();
            var max = $(this).attr("data-max");
            for( var i = 1; i <=max; i++){
              var item = masterContainerItemObj.clone();
              item.text(i);
              if(i == $(this).text()){
                item.addClass("selected");
              }
    /* add your data for this select item here, or, attach it to the newContainer, i leave that to you*/
              newContainer.append(item);
            }
            $(this).after(newContainer);
          });
        });
        </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am want to create a javascript function using jQuery which will close the
I want to run javascript/Python/Ruby inside my application. I have an application that creates
I want to create a Java application bundle for Mac without using Mac. According
I am trying to create two dynamic dates in html/javascript/jquery. I want the dates
I'm using jQuery to create a simple, but large dropdown menu. I have some
I want to create a compiled JavaScript file for my website. For development I
I want to create a draggable and resizable window in JavaScript for cross browser
I create a file in JavaScript. Now I want to be able to make
I want create a drop shadow around the canvas component in flex. Technically speaking
Can anyone help me create a javascript/jquery function to control the HTML5 audio tag

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.