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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:29:03+00:00 2026-05-27T18:29:03+00:00

I am not able to get value of a row because is giving Object

  • 0

I am not able to get value of a row because is giving Object Text (in FireFox and Chrome) where as it should be Object HTMLInputElement (which is in IE).
This is working smoothly in IE but not in Firefox.

HTML code:

<table id="mode">

<tr class="jnclisthdrrow">
    <td class ="jnclistcenter">&nbsp;</td>
    <td class ="jnclistcenter">Rank</td>
    <td class ="jnclistcenter">Mode</td>

 </tr>
 <tr>
    <td class ="jnclistcenter">&nbsp;</td>
    <td class ="jnclistcenter">&nbsp;</td>
    <td class ="jnclistcenter">&nbsp;</td>

</tr>
<tr >
<td class="jnclistcb">
    <input type=checkbox name="MODE_SL_Instance" value="0"></td>
<td align="center" class="tdata">   1</td>
<td class = "listdataright"><option value=''></option><option value='1246'>CWT</option>
</td>
</tr>
</table>

JAVA script code

 var table = document.getElementById("mode");
 var max = table.rows.length;
 console.log("no of rows are being selected="+max );
for ( var id = 0; id < max; id++ )
{   
    var row = table.rows[id];   
    var chkbox = row.cells[0].childNodes[0];
 if( null != chkbox && true == chkbox.checked ) 
    {
 console.log("inside the condition that anddeleted id ="+ id);
 table.deleteRow(id); 
    id--;
    }
}

Console log different browsers

for fireFox and Chrome

no of rows are being selected=3

the valur of chkbox.checked box is=undefined the value of the checkbox=[object Text]

the valur of chkbox.checked box is=undefined the value of the checkbox=[object Text]

the valur of chkbox.checked box is=undefined the value of the checkbox=[object Text]

for IE

no of rows are being selected=3

the valur of chkbox.checked box is=undefined the value of the checkbox=[object Text]

the valur of chkbox.checked box is=undefined the value of the checkbox=[object Text]

the valur of chkbox.checked box is=true the value of the checkbox=[object HTMLInputElement]

inside the condition that anddeleted id =2

Row Deleted!

My question is why Firefox is not able to recognize that row 2 as [object HTMLInputElement].
Where am I going wrong?
Please help!

  • 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-27T18:29:03+00:00Added an answer on May 27, 2026 at 6:29 pm

    Firefox and Chrome are following the W3C specification; I believe IE9 behaves the same.

    Your code is relying upon IE<9 skipping text nodes consisting of whitespace. For the third row, Firefox, Chrome, and IE9 give two child nodes for the first cell: a text node containing \n (i.e., a newline followed by four spaces), and an input element. IE<9 skips the first text node because it consists purely of whitespace.

    The easiest solution to this problem is to use children[0] instead of childNodes[0], as that gives the first Element child, as opposed to the first child.

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

Sidebar

Related Questions

I am not able to get my jwysiwyg and Jhtmlarea text editors to work
I have few Question for which I am not able to get a proper
I know this is simple but I am not able to get it right
In this fiddle, i am not able to get the Dynamic Event Handler onclick
This is an open ended interview question. I am not able to get a
I've read the DateFormatting guide and I'm still not able to get a working
I have done jQuery and Ajax, but I am not able to get the
Trying out the examples found on pleac.sf.net , I'm not able to get an
I am learning Java Security JCE/JAAS. I am not able to get a example
I am able to get the output format that I need, but not the

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.