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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:48:10+00:00 2026-05-24T21:48:10+00:00

I just asked a question about ordering but it was only the first part

  • 0

I just asked a question about ordering but it was only the first part of what I needed. I want to ask the full question now to see if its possible:

Its for a chat webpage and users can be online (active), offline (noactive) or have a message pending (msg) or no message pending (nomsg). Also keep the ID name in mind for A-Z
eg:

 <div id="chatCenterMembers">
    <div id="lee" class="chatmember 10001 active msg"></div>
    <div id="arch" class="chatmember 10008 noactive nomsg"></div>
    <div id="steven" class="chatmember 10041 noactive msg"></div>
    <div id="tim" class="chatmember 10432 active nomsg"></div>
    <div id="ssan" class="chatmember 10007 active msg"></div>
    <div id="yanti" class="chatmember 10034 noactive msg"></div>
  </div>

Is it possible to order this as follows:
1. active msg (A-Z)
2. active nomsg (A-Z)
3. noactive msg (A-Z)
4. noactive nomsg (A-Z)

thx

  • 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-24T21:48:11+00:00Added an answer on May 24, 2026 at 9:48 pm

    The most basic way to do this would be to create 4 arrays (one for each case of active/msg), and separate the divs into those arrays. Then, sort each array. Lastly, either write the divs to the page in order of the arrays, or combine them into one array and write that one to the page. This allows you, if you later decide to, to change the ordering of active vs inactive/msg vs no message by simply swapping a couple lines.

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

Sidebar

Related Questions

I just asked a question about this but I want to go at it
I know I've just asked a question about this, but I cannot figure out
Just asked a question about linking Boost libraries in the make file. Thanks to
I was just about to ask the same questions as the question aksed here....
I have just asked this question an hour ago but with regards to IE8
In another question , I asked something similar but I ended up just posting
I just asked a question about Regex, and received a great answer: JavaScript Split
I just asked a question that helps about using generics (or polymorphism) to avoid
I asked a question about this previously but my database structure has changed, and
A similar question was asked and answered about a year ago, but was either

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.