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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:31:31+00:00 2026-05-24T04:31:31+00:00

var user = {}; var row = $(‘<tr></tr>’) .append($(‘<td></td>’).text(user ? user.call_id : ”)) .append($(‘<td></td>’).text(user

  • 0
var user = {};
var row = $('<tr></tr>')
   .append($('<td></td>').text(user ? user.call_id : ''))
   .append($('<td></td>').text(user ? user.phone_number : ''))
   .append($('<td></td>').text(user ? user.dialed_number : ''))
   .append($('<td></td>').html(user && user.admin ? '<span class="textgreen">admin</span>' : 'guest'))
   .append($('<td></td>').append(_talking(user ? user.mute : 0)))
   .append($('<td></td>').append($('<span></span>').addClass('timer').text(user ? user.duration : '')))
   .append($('<td></td>').addClass('nowrap').append(_userButtons(user)))
;
alert( row.find('td').size() );    // = does NOT always alert 7, but a smaller value

Why is that so?

At the moment, user.dialed_number is undefined, therefore the missing column is the third one. And it doesn’t matter how much I repeat that column, the result is always 6 in my project.

** UPDATE **

Here is a simplified jsfiddle showing the problem; it should output 7, but it shows 4

  • 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-24T04:31:31+00:00Added an answer on May 24, 2026 at 4:31 am

    If any one of the expressions passed to .text() evaluates to null or undefined, the call to .text() will return the text of the TD – which is nothing – instead of the jQuery collection representing the TD. So you’d append 6 TDs and a nothing.

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

Sidebar

Related Questions

Recently saw someone commending another user on their use of sizeof var instead of
I am creating a user input at one of the events: var throwConnectBox =
The following code throws System.UriFormatException: var uri = new UriBuilder(ftp://user:pass#word@ftp.somewhere.com:21/fu/bar.zip); System.UriFormatException: Invalid URI: A
I'm trying to do this: using(var context = new SampleEntities()) { User user =
How do I access user preferences in Firefox? I have the following code: var
The number of query conditions is determined by user selections at runtime, ie var
I have a table named users and each row (user) has an image. The
i'm trying to lock a row in a db-table when a user is editing
I am using datatables in my application. Whenever user click on any row I
when the user click on the tableviewrow, alert box 'row' will occur. And inside

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.