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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:07:43+00:00 2026-05-11T17:07:43+00:00

I have a table like so <table> <tr id=trRow1 runat=server style=display: none> <td>First Name:</td>

  • 0

I have a table like so

<table>
  <tr id="trRow1" runat="server" style="display: none">
    <td>First Name:</td>
    <td><asp:Label id="lblFirstName" runat="server"></asp:Label></td>
  </tr>
  <tr>
    <td>Last Name:</td>
    <td><asp:Label id="lblLastName" runat="server"></asp:Label></td>
  </tr>
</table>

As you can see, initially the first row is not being displayed. When the user clicks a certain radio button on the page an asynchronous postback occurs, and at that time I set the style of trRow1 to “inline”. Nothing fancy; nothing new. It works just great.

Or at least up until I try to do the following in a javascript function.

function Test() {       
  var obj = trRow1.getElementsByTagName("select");
  alert(obj.length);
}

At the point I call Test(), I get an error that says “Microsoft JScript runtime error: ‘trRow1’ is undefined.”

My guess is it has something to do with the fact that I’m messing with setting the Display style using AJAX, and for whatever reason the DOM can’t find trRow1 even after I set it’s display to “inline”.

Can anyone throw me a bone on this one? I’m stuck.

  • 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-11T17:07:43+00:00Added an answer on May 11, 2026 at 5:07 pm

    The object trDegree is not defined, by your naming conventions looks like trDegree is a table row element, I think that you’re trying to do something like this:

    function WTF() {       
      var trDegree = document.getElementById('trDegree'); // Locate the element
      var obj = trDegree.getElementsByTagName("select");
      alert(obj.length);
    }
    

    Further Reference:

    • element.getElementsByTagName
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table like server(id,name,ip) . When I'm trying to sort results by name,
I have a aspx page that looks something like this: <table runat=server id=tblTEst> <tr
I have a table like this: name code group john 12 smith 15 how
i have a table like this one: -------------------------------- id | name -------------------------------- 1 |
I have two table like this table_CN (_id, name, phone, favorite, title) table_EN (_id,
I have table like below id, employee_no, survey_no, name 1 test 1 test_name 2
I have table like this ------------------------------------------------------------------- id | title | image | name |
Here is the thing, I have table like this First one ID1 ID2 ID3
I have a table like this: ID | name ================================= 1 | apple 1
I have table like this: Code label Zone Price ---- ----- ---- ----- 049

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.