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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:33:31+00:00 2026-06-10T03:33:31+00:00

So I have something like <ul> <li> <a href=123.html>123</a></li> <li> <a href=abc.html>abc</a></li> </ul> This

  • 0

So I have something like

<ul>
<li> <a href="123.html">123</a></li>
<li> <a href="abc.html">abc</a></li>
</ul>

This sites in my INDEX.HTML file. Except there are loads more lists and list items. Each HTML page that is linked to has a section like this:

<ul>
<li><strong>Time: </strong>12:00</li>
</ul>

What I want is when the user sees the INDEX.HTML page, the time gets added to the end (from the relative link) so it reads like

  • 123 – 12:00
  • ABC – 13:00

Can someone please help? I realise I might need contents() and fine() but have got nowhere quick. So basically for each link, we go to the URL in question, grab the time and add it the original line on INDEX.HTML

Thanks.

  • 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-10T03:33:33+00:00Added an answer on June 10, 2026 at 3:33 am

    The idea could be as follows:

    1. Loop through the lis.
    2. Get the href attribute of the a child.
    3. Send an ajax request to that page.
    4. Parse the response and find the appropriate text using jQuery.
    5. Append that text to the li.

    On jsFiddle it’s not very easy to generate separate pages, so you’ll have to alter it a bit for your case. Also, you may want to make the selector stricter (ul strong is the best I can make up with your example).

    http://jsfiddle.net/3JQDz/

    $("li").each(function() {
        var $li = $(this);
        var href = $li.find("a").attr("href");  // use this in your real case
    
        $.ajax({
            type: "POST",
            url: "/echo/html/",  // this is just the way to use ajax on jsFiddle
            data: {
                html: "<ul><li><strong>Time: </strong>12:00</li></ul>"
            },
            success: function(html) {
                // full document -> only the li -> its child nodes -> the last one (the text node) -> its text
                var time = $(html).find("li").contents().last().text();
                $li.append(" - " + time);
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

basically I have a link like so: <a href=file.php?value=this&something=so&please=help>special link</a> And when I click
Simply I have a bunch of links like so <div id=categoryLinks> <a href=blah.php?something=this&category=21></a> <a
I have a link with 'remove' anchor text with href something like below: ./index.php?del_id=5
So I have a HTML string like this: <td class=name> <a href=/blah/somename23123>Some Name</a> </td>
so I have something like this - <a href=link... class=text-box-a-href > <div class=text-box> <h4>text...</h4>
I have a json structure that looks something like this: list:[ { type:link, href:http://google.com
i have code, which does something like this: item.previous.parent.parent.aTag['href'] now i would like to
I have a string which is something like this : a_href= www.google.com/test_ref=abc; I need
I have a html table that looks something like this <table id=eventTable> <thead> <tr><th>#</th><th>Options</th></tr>
I have something like this: function showFunction () { // need position and place

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.