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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:16:07+00:00 2026-05-17T03:16:07+00:00

I have a webpage from the Fogbugz bug tracking system, and using a plugin

  • 0

I have a webpage from the Fogbugz bug tracking system, and using a plugin to Fogbugz, I can insert javascript into each page.

In this Fogbugz installation I have created a custom field, with the case number of a different system, and this is shown in the case listings.

I’d like to make this column clickable, which would open a new tab and open the corresponding case in that other system.

The table cell in the webpage looks like this in html:

<td class="col_8"><div onmousedown="x(event)"><nobr><span>44468</span></nobr></div></td>

Basically I’d like to make that number, 44468, into a clickable link.

I’ve tried this jQuery code:

$(".col_8").html("....");

but this replaces the contents of the entire TD cell. That’s OK by me if that’s the best way to do it, but I don’t know how to refer to the case number so that the link becomes the right one.

This, for instance, works in the sense that they all become links, but creates the same link for all the cases (ie. they all point to the same case number, obviously):

$(".col_8").html("44468");

I improved it (I’m learning jQuery):

$(".col_8>div").html("<a href='http://other.system/?44468'>44468</a>");

Additionally, the first row has a text that denotes the name of that system, this has different html, and only letters in the text, and I’d like for that part to stay as it is.

Can anyone tell me where to look or what to google for in order to find out what I need?


Courtesy of @Nick Craver‘s answer and comments, this is the final script that worked for me:

$(".col_8 span").filter(function() {
    return $.trim($(this).text());
}).each(function() {
    $(this).wrap("<a target='_blank' href='http://other.system?" + this.innerHTML + "' />");
});
  • 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-17T03:16:08+00:00Added an answer on May 17, 2026 at 3:16 am

    You can pass a function to .wrap(), like this:

    $(".col_8 span").wrap(function() {
      return "<a href='http://other.system/?" + this.innerHTML + "' />";
    });
    

    You can test it out here, the result is turning:

    <span>44468</span>
    

    Into:

    <a href="http://other.system/?44468"><span>44468</span></a>
    

    The rest remains unchanged. If the markup isn’t exactly as you posted and there are spaces, etc, you’ll want $(this).text() instead of this.innerHTML, possibly with a $.trim() wrapper as well.


    Since the OP is on jQuery 1.3.2 (the above is for jQuery 1.4+ only), here’s that version:

    $(".col_8 span").each(function() {
      $(this).wrap("<a href='http://other.system/?" + this.innerHTML + "' />");
    });
    

    You can test it here.

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

Sidebar

Related Questions

I have a web page where users can see data from MongoDB on a
I have a webpage that accepts HTML-input from users. The input is converted into
I have a webpage that reads data from an external source. It can take
I was using wget with system call (c++) to save a webpage from internet
I have a webpage that uses JavaScript to retrieve JSON from a web service.
I have the following example page structure: Webpage.aspx Script.aspx If I call Server.Execute(Script.aspx) from
Scenario: I have a webpage that needs to make XMLRPC calls from Javascript, and
I did scraping text from webpage using scrapy. In spider, I have code like:
Database resources, that can be accessed from webpage that I'm currently working on, have
I have taken script from a webpage document I have made and I have

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.