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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:03:16+00:00 2026-06-09T12:03:16+00:00

I have the following code: // Setup a content array for the tooltips var

  • 0

I have the following code:

// Setup a content array for the tooltips
var Data = [];
var search = $("input#field_search").val();
var combo = $("select#search_option").val();
var jsonUrl = "ajax.php?module=formation&action=get_participant_list_json&filter_by=" + combo + "&search=" + search;

$.getJSON(jsonUrl, function(data) {
    var items = [];
    alert(data.join(" || " )); //WHAT TO SHOW YOU HERE

    $.each(data, function(key, val) {
        //alert(val);
        items.push(val.replace(/@/gi, "#"));
    });
    //console.log(items);
    //alert(items.join(" || " ));
    $(".tips").each(function(i) {
        $(this).simpletip({ content: items[i] });
    });
});

If I access

ajax.php?module=formation&action=get_participant_list_json

or

ajax.php?module=formation&action=get_participant_list_json&filter_by=&search=

directly with IE7, I get the good response data in the following order:

["0Bequart Claire","1AZZI Sarah"]

But if I alert(data.join(" || " )); I got reversed

  0AZZI Sarah || 1Bequart Claire

Do you know where my mistake is? Why is the response list in reverse order?

Thanks for your 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-06-09T12:03:17+00:00Added an answer on June 9, 2026 at 12:03 pm

    I cannot completely follow your code so I apologise if I have misunderstood, but .push looks like an operation intended to implement a LIFO stack. If you want to unload (list) the array in the same order that you loaded it, you should load it with an append operation and unload it with an iterator.

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

Sidebar

Related Questions

I have the following piece of code: // setup the AJAX request var pageRequest
I have the following code setup: http://jsfiddle.net/bABHU/2/ Had to change it a little bit
I have following code for inserting data into database using PDO. It inserts data
I have an array of URLs of content to load asynchronously, e.g. var toLoad
I have the following code setup to delete records from my database. It executes
I have the following code set up in my Startup IDictionary<string, string> properties =
I have following code in initialization im = imread('Image02.tif'); figure(); imagesc(im); colormap(gray); [hImage hfig
I have following code <div id=main> <div id=one> </div> <div id=two> </div> <div id=three>
I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I have following code for loading image from url in xml parsing endElement method

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.