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

  • Home
  • SEARCH
  • 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 850417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:15:47+00:00 2026-05-15T07:15:47+00:00

We have the following XHTML table: <tr class=encabezado> <th scope=col width=2%>1</th> <th scope=col width=2%>2</th>

  • 0

We have the following XHTML table:

  <tr class="encabezado">
    <th scope="col" width="2%">1</th>
    <th scope="col" width="2%">2</th>
    <th scope="col" width="2%">3</th>
    <th scope="col" width="2%">4</th>
    <th scope="col" width="2%">5</th>
    <th scope="col" width="2%">...</th>
    <th scope="col" width="2%">31</th>
  </tr>
  <tr>
    <th scope="row">Area 1<input name="line_config" type="hidden" value="0,5,50" /></th>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt">...</td>
    <td class="gantt"> </td>
  </tr>
  <tr>
    <th scope="row">Area 2 <input name="line_config" type="hidden" value="0,0,10" /></th>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt"> </td>
    <td class="gantt">...</td>
    <td class="gantt"> </td>
  </tr>

When there is a click over a TD.gantt element, we want jQuery to get the value from input[name=’line_config’] tag. We try the following jQuery code, but val() returned ‘undefined’:

$(document).ready(function() {
    function sum_day(tag, status, column) {
        var total_day = 0;
        var index_pos = 0;
        var values = 0;

        values = tag.closest('tr').children("input[name='line_config']").val();
        alert(values); //Return undefined

        return total_day;
    }

    $('td.gantt').click(function() {
        var gantt_tag = $('td.preop');

        $(this).toggleClass('preop');
        sum_day(gantt_tag, 'preop', $(this).index());
    });
});

Are we getting right the value way? If anyone can help us, we appreciate… =)

  • 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-15T07:15:48+00:00Added an answer on May 15, 2026 at 7:15 am

    Note jquery.children() will only return direct/immediate children, and since your input is not a direct/immediate child of the <TR> you will not get any of the inputs.

    May I suggest something like this

    $("input[name='line_config']", tag.closest('tr'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following in my index.xhtml style type=text/css media=screen and (min-width: 500px) @import
I have the following within an XHTML document: <script type=text/javascript id=JSBALLOONS> function() { this.init
I have the following code : <html xmlns=http://www.w3.org/1999/xhtml> <body style=height: 1336px> <input type=hidden id=loadingtime/>
I have the following code: <table class=top> <tr> <td> <table class=errMsg><tr><td>Required field must not
I have the following table: <table> <tr> <td style=height: 7px; width: 7px> A1 </td>
From this XHTML source: <div class = page> <h1>UNIQUE NAME</h1> <table> <tbody> <tr> <td>DATA
I have the following JSF table: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
Let's say I have the following table in my XHTML page: <tr:table id=listRowsTable var=bb
Trying to use JSTL but have the following problem: Index.xhtml page: <?xml version=1.0 encoding=UTF-8?>
In my xhtml page I have the following tag included: <f:view locale=#{languageBean.locale}> ... </f:view>

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.