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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:11:02+00:00 2026-05-17T18:11:02+00:00

This is a little complicated so I will try and explain as best as

  • 0

This is a little complicated so I will try and explain as best as I can. In the following code the goal is to find a td with the text “(Backordered)” and replace it with a link with the following URL

/Email_Me_When_Back_In_Stock.asp?ProductCode=H210-10 

The “H210-10” needs to be extracted from the 1st sibling td, in this case

<td class="smalltext colors_text">H210-10</td>

Note: there can be more than one tr > td with “(Backorder)” in it and I need to do this for each and every one that has “(Backorder)” in it. I am struggling on how to tackle this issue. I have no access to the markup.

<table cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc">
<tr class="colors_backgroundlight">
<td>Item#</td>
<td>Item Name</td>
<td>Our Price</td>
<td>Qty</td>
<td><b>Add</b></td>
</tr>
<tr bgcolor="#ffffff" class="Multi-Child_Background">
<td class="smalltext colors_text">H211-41</td>
<td class="productnamecolorSMALL colors_productname">J. Herbin Small Glass Dip Pen - Amber Frosted</td>
<td class="smalltext colors_text"><b>$15.75</b></td>
<td><input type="textbox" value="1" name="QTY.H211-41" maxlength="8" size="5"></td>
<td><input type="checkbox" value="H211-41" name="ProductCode"></td> 
</tr>
<tr bgcolor="#ffffff" class="Multi-Child_Background">
<td class="smalltext colors_text">H211-09</td>
<td class="productnamecolorSMALL colors_productname">J. Herbin Small Glass Dip Pen - Black Frosted</td>
<td class="smalltext colors_text"><b>$15.75</b></td>
<td><input type="textbox" value="1" name="QTY.H211-09" maxlength="8" size="5"></td>
<td><input type="checkbox" value="H211-09" name="ProductCode"></td> 
</tr>
<tr bgcolor="#ffffff" class="Multi-Child_Background">
<td class="smalltext colors_text">H210-10</td>
<td class="productnamecolorSMALL colors_productname">J. Herbin Small Glass Dip Pen - Blue Striped</td>
<td class="smalltext colors_text"><b>$15.75</b></td>
<td colspan="2"><b><font color="#cc0000"><span class="331">(Backordered)</span>
</font></b></td>
</tr>
<tr bgcolor="#ffffff" class="Multi-Child_Background">
<td class="smalltext colors_text">H210-30</td>
<td class="productnamecolorSMALL colors_productname">J. Herbin Small Glass Dip Pen - Green Striped</td>
<td class="smalltext colors_text"><b>$15.75</b></td>
<td><input type="textbox" value="1" name="QTY.H210-30" maxlength="8" size="5"></td>
<td><input type="checkbox" value="H210-30" name="ProductCode"></td> 
</tr>
<tr bgcolor="#ffffff" class="Multi-Child_Background">
<td class="smalltext colors_text">H210-20</td>
<td class="productnamecolorSMALL colors_productname">J. Herbin Small Glass Dip Pen - Red Striped</td>
<td class="smalltext colors_text"><b>$15.75</b></td>
<td><input type="textbox" value="1" name="QTY.H210-20" maxlength="8" size="5"></td>
<td><input type="checkbox" value="H210-20" name="ProductCode"></td> 
</tr>
<tr bgcolor="#ffffff" class="Multi-Child_Background">
<td class="smalltext colors_text">H211-77</td>
<td class="productnamecolorSMALL colors_productname">J. Herbin Small Glass Dip Pen - Violet Frosted</td>
<td class="smalltext colors_text"><b>$15.75</b></td>
<td><input type="textbox" value="1" name="QTY.H211-77" maxlength="8" size="5"></td>
<td><input type="checkbox" value="H211-77" name="ProductCode"></td> 
</tr>
<tr><td bgcolor="#ffffff" align="right" class="smalltext colors_text Multi-Child_Background" colspan="5">Check the items you wish to purchase, then click
<input type="hidden" value="Y" name="IsMultiChildAddToCart">
<input type="hidden" value="ShoppingCart.asp" name="ReturnTo">
<input border="0" type="image" alt="J. Herbin Small Glass Dip Pen" name="btnaddtocart" src="/v/vspfiles/templates/140/images/buttons/btn_addtocart.gif">
</td></tr></table>
  • 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-17T18:11:03+00:00Added an answer on May 17, 2026 at 6:11 pm

    It turns out I did have some limited access to the markup whereas before i thought I did not have any access.

    I was able to add a class to the “(backorder)” text as such…

    <span class="331">(Backordered)</span>
    

    and by doing that I came of with the following Jquery that worked.

    <script type="text/javascript" language="javascript">
    $(document).ready(function(){
    $('.331').each(function(){
    $(this).closest('td').replaceWith( '<td colspan="2"><a href="/Email_Me_When_Back_In_Stock.asp?ProductCode=' + $(this).closest('td').siblings(':first-child').text() + '"><img border="0" src="/v/vspfiles/templates/140/images/buttons/btn_emailbackinstock.gif"</a></tr>');
    }); 
    });
    </script>
    

    Thanks all for your help which helped me into figuring this out.

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

Sidebar

Related Questions

I want to use a temp directory that will be unique to this build.
This is beyond both making sense and my control. That being said here is
I have found this example on StackOverflow: var people = new List<Person> { new
Let say I have the following desire, to simplify the IConvertible's to allow me
I have a new web app that is packaged as a WAR as part
(please excuse that I didn't use aliases). I would like my query output to
I'm trying to build a C++ extension for python using swig. I've followed the
I have a login.jsp page which contains a login form. Once logged in the
I need to develop a file indexing application in python and wanted to know
I was reading JavaScript: The Good Parts and the author mentions that JavaScript is

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.