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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:18:03+00:00 2026-06-12T01:18:03+00:00

I am using the following snippet for updating some textbox value from a table.

  • 0

I am using the following snippet for updating some textbox value from a table.

<table>
  <tr>
    <td>ProjectName</td>
    <td>Block</td>
    <td>.WorkProgressMilestone</td>
    <td>Completion</td>
    <td>
       <span class="sep">
       <img height="15px" width="20px" src="@Url.Content("~/Content/themes/base/images/Edit.png")" />
       </span>
       <a href="#" onclick="EditWorkDetails(this);" style="text-decoration: none">Edit</a>
       <input id="WorkProgressEditID" name="WorkProgressEditID" type="hidden" value="@v.WorkProgressID" />
     </td>
   </tr>
   <tr>..</tr>
 </table>


function EditWorkDetails(e) {
document.getElementById("txtCompletion").value = e.parentNode.parentNode.childNodes[3].innerText;
}

It works fine for me in IE, but not working in other browsers(Chrome). A notable thing is that the table ‘td’s and ‘tr’s don’t have Id property to distinguish each other. So I can’t use jquery over here. What is the alternative I can follow to make it work in all browsers.

  • 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-12T01:18:04+00:00Added an answer on June 12, 2026 at 1:18 am

    try this:

    document.getElementById("txtCompletion").value = $(this).parent().parent().children()[3].html();
    

    or

    $("txtCompletion").val($(this).parent().parent().children()[3].html());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code-snippet extensively in my model templates. <div class=control-group> @Html.LabelFor(model =>
From the book Groovy and Grails recipes I'm using the following code snippet: String
I could build a sip profile using SipProfile.Builder class. I used following snippet of
I'm using the following snippet: $('input[value=NEW]:hidden').attr('value', '').parent().parent().animate({ backgroundColor: #FF9933, duration: 800 }).delay(500).animate({ duration: 800,
Im using the following code snippet .append( $('<td>').append( $('<a>').attr({ href: '#', class: 'assDelete', dataassetid:
I'm currently using the following snippet to insert data into a table in my
I'm using the following snippet (taken from html5 boilerplate ) to gzip files. I
I have a double value I would like to increment, using the following snippet:
I'm using the following snippet of code to attempt to copy a file from
I am using following snippet to build a 32 bit integer to use with

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.