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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:54:10+00:00 2026-06-15T08:54:10+00:00

i have this code: <table> <tbody> <tr> <td align=left>X</td> <td>X1</td> </tr> <tr> <td width=150

  • 0

i have this code:

<table>
    <tbody>
        <tr>
            <td align="left">X</td>
            <td>X1</td>     
        </tr>
        <tr>        
            <td width="150" align="left">Y</td>
            <td>Y1</td>
        </tr>
        <tr>    
            <td align="left">Status: </td>
            <td colspan="4">
                <select name="status" size="1">
                    <option selected="selected" value="2">one</option>
                    <option value="1">two</option>
                </select>                   
            </td>
        </tr>
        <tr>        
            <td width="150" align="left">Z</td>
            <td>Z1</td>
        </tr>   
    </tbody>
</table>

and want to remove with Javascript this line:

<tr>    
    <td align="left">Status: </td>
    <td colspan="4">
        <select name="status" size="1">
            <option selected="selected" value="2">one</option>
            <option value="1">two</option>
        </select>                   
    </td>
</tr>

the problem is that i don’t have any id’s or classes for identification.
is there a way to remove the row by searching “Status: ” or name=”status” with javascript for Firefox only (using it for Greasemonkey)?

i can’t use jQuery and i can’t edit the code to set any id’s

best regards
bernte

  • 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-15T08:54:11+00:00Added an answer on June 15, 2026 at 8:54 am
    function removeRowByCellValue(table,cellValue) {
        var cells = table.getElementsByTagName("TD");
        for(var x = 0; x < cells.length; x++) {
    
            // check if cell has a childNode, prevent errors
            if(!cells[x].firstChild) {
                continue;
            }
    
            if(cells[x].firstChild.nodeValue == cellValue) {
                var row = cells[x].parentNode;
                row.parentNode.removeChild(row);
                break;
            }
        }
    }
    

    First get a reference to your table, since you do not have an ID you can use getElementsByTagName.. (here i’m assuming that it is the first table in your document)

    var myTable = document.getElementsByTagName("table")[0];
    

    Then you can invoke the function with the following parameters

    removeRowByCellValue(myTable,"Status: ");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have this piece of code: @Entity @Table(name = MOVERS) public class MOVers implements
So I have this code here: <table> <tr> <td width=200px valign=top> <div class=left_menu> <div
i have this html code <table style=width: 100%;> <tr> <td> ID </td> <td> <input
I have this js code: $(.main-vervolg .right .bottom .panes table.grey tbody tr:odd).css(background-color, #f8f8f8); And
I have this code : http://jsfiddle.net/VAkLn/6/ When i add a table : http://jsfiddle.net/VAkLn/7/ this
I have this table: fourn_category (id , sub) I am using this code to
i have this code, which helps me to retrieve all table fields and associate
For example, I have this code: <table> <tr> <td class=last></td> <td></td> </tr> <tr> <td
I have this JavaScript code that creates a table, and puts in the rows

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.