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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:43:37+00:00 2026-05-27T01:43:37+00:00

Buildgames returns rows: <a>….</a> <a>….</a> When I click on each a the Buildcar_s function

  • 0

Buildgames returns rows:

<a>....</a>
<a>....</a>

When I click on each a the Buildcar_s function returns all the data inside an alert.

Instead of this alert I want to put all the results in a div under each a, so it would look like:

<a>.....clicked ...</a>
<div>....
    ...
</div>
<a>....not clicked...</a>
<a>....not clicked...</a>
<a>....not clicked...</a>

How can we put a div only under the a which was clicked?

function Buildcar_s(items) {
    var div = $('<div/>');
    $.each(items, function() {
        var car_ = this.car_;
        $('<a>' + this.car_ + '----' + this.Names + '---' + '</a>').click(function() {
            _Services.invoke({
                method: 'GetgamesRows',
                data: {
                    car_Number: car_
                },
                success: function(car_s) {
                    
var div = Buildgames(car_s);
                         $(div).insertAfter($a);
                }
            });
        }).appendTo(div);
        $('<br/>').appendTo(div);
    });

    $("#leftRows").append(div);
}

function Buildgames(items) {
    var place = '<div>';
    $.each(items, function() {
        place += 'mmmmmm<br/>';
    });
    place += '</div>';

return place;
}

  • 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-27T01:43:38+00:00Added an answer on May 27, 2026 at 1:43 am

    Try this, relevant changes have been commented:

    function Buildcar_s(items) {
        var div = $('<div/>');
        $.each(items, function() {
            var car_ = this.car_;
            $('<a>' + this.car_ + '----' + this.Names + '---' + '</a>').click(function() {
                var $a = this;
                _Services.invoke({
                    method: 'GetgamesRows',
                    data: {
                        car_Number: car_
                    },
                    success: function(car_s) {
                        var div = Buildgames(car_s);
                        // this inserts the HTML generated from the function, 
                        // under the A element which was clicked on.
                        $(div).insertAfter($a); 
                    }
                });
            }).appendTo(div);
            $('<br/>').appendTo(div);
        });
    
        $("#leftRows").append(div);
    }
    
    function Buildgames(items) {
        var place = '<div>';
        $.each(items, function() {
            place += '<div style="float: right;">&nbsp;&nbsp;&nbsp;' + this.CITY + '&nbsp;&nbsp;&nbsp;' + '</div><BR />' + +'<br/><br/>';
        });
        place += '</div>';
    
        return place; // returns the string created, as opposed to alerting it.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new programming in shell and I need some help with this code... Buildname=
I am reading an external log file via xslt, and i want to find
I am getting this error when trying to pass my object to the view.
I want to build games in C on iphone (I know C# and Java
In our school, it is common to build games as class projects in implementing
I have CruiseControl.NET version 1.4.4.83, and I am wondering if there it provides a
I have a windows batch command in my hudson build step that is basically:
Please take a look at the site tdsoft.se The script on that page works
I am using MSBuild in my TFS Buildprocess using the DefaultTemplate to build multiple
I'm trying to use google.appengine.ext.deferred to run a Task. I am passing a 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.