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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:48:21+00:00 2026-06-01T17:48:21+00:00

I have a javascript variable named response . This is the response from an

  • 0

I have a javascript variable named response. This is the response from an ajax call. This variable has the following content:

<table id="ListCompanies" class="zebra-striped">

<thead>
    <tr>
        <th>Nom de la societe</th>
        <th>Ville</th>
        <th>Rue</th>
        <th width="70"><a class="btn primary small createCompany" href="/PLATON/Admin/Company/Create">[+] Nouvelle societe</a> </th>
    </tr>
</thead>

<tbody>
        <tr id="13">
            <td>INDUSTRIAL DEFENDER INC</td>
            <td>FOXBOROUGH</td>
            <td>Chestnut Street</td>

            <td nowrap>                                    
                <a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/13" id="13">Modifier</a> 
                <a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/13" id="13">Supprimer</a>
            </td>
        </tr>
        <tr id="14">
            <td>INC CRANE NUCLEAR</td>
            <td>GEORGIA KENNESAW</td>
            <td>cobb International Blvd</td>

            <td nowrap>                                    
                <a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/14" id="14">Modifier</a> 
                <a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/14" id="14">Supprimer</a>
            </td>
        </tr>
</tbody>

</table>



<a href="/PLATON/Admin/Company/RowsList?page=3" id="LoadMoreLink">Load more</a>

alert($("tbody", response).html()); gives me:

        <tr id="13">
            <td>INDUSTRIAL DEFENDER INC</td>
            <td>FOXBOROUGH</td>
            <td>Chestnut Street</td>

            <td nowrap>                                    
                <a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/13" id="13">Modifier</a> 
                <a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/13" id="13">Supprimer</a>
            </td>
        </tr>
        <tr id="14">
            <td>INC CRANE NUCLEAR</td>
            <td>GEORGIA KENNESAW</td>
            <td>cobb International Blvd</td>

            <td nowrap>                                    
                <a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/14" id="14">Modifier</a> 
                <a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/14" id="14">Supprimer</a>
            </td>
        </tr>

That’s ok for me.

How can I get the link at the bottom #LoadMoreLink from the response variable?

I tried:

alert($("#LoadMoreLink",response));

But it didn’t work.

  • 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-01T17:48:22+00:00Added an answer on June 1, 2026 at 5:48 pm

    Your response contains 2 “parent” elements, the <table>, and the <a>. $(response) creates a jQuery object with 2 elements. To get the one you want, try this:

    $(response).filter('#LoadMoreLink')
    

    .find doesn’t work here, as .find only searches children, not the “parent” elements themselves. You need to use .filter to search for the “parent” element.

    (By “parent” element, I mean the element that’s actually in the jQuery object).

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

Sidebar

Related Questions

I have a variable that I'm using to build a JavaScript function call, and
I have a JavaScript variable which contains the name of a JavaScript function. This
I have got this JavaScript code for uploading files to my server (named it
I have the following script in my javascript... $.ajax({ type: 'POST', url: 'http://www.example.com/ajax', data:
I have javascript string variable with var sttr=We prefer questions that can be answered
I have a javascript question. I'm trying to dynamically build a plugins string variable
I have a javascript function create(tagName, options) and the options variable is a JSON
Can you setup a variable for javascript in one page and have another page
In Javascript, I have a variable that is set to a block of text
I know that javascript doesn't have pointers in terms of a variable referring to

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.