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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:22:31+00:00 2026-05-20T14:22:31+00:00

I have been trying to use Jeditable to make my html table editable. However

  • 0

I have been trying to use Jeditable to make my html table editable. However upon much research I found that it is very difficult (if not impossible without a backend) to validate the input.

I really would prefer NOT to use any sort of plugin and simply write/use a bit of Javascript that would make cells editable and allow me to attach jQuery Validator to the input. The data will never get submitted to a backend (will return to default on page refresh) so the solution doesn’t need to be complex…will only be using html and Javascript.

The problem with most code snippets I have found using Google is that they seem to get stuck when you click inside a cell and clicking outside the cell doesn’t save/submit the change.

Does anyone have a snippet they have used successfully and/or experience using a snippet with Validator?

  • 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-20T14:22:31+00:00Added an answer on May 20, 2026 at 2:22 pm

    Well, according to information I got in your another question, you can change that function to:

    function appendTable(id)
     {
         var tbody = document.getElementById(id).getElementsByTagName("tbody")[0];
         var i = 0;
         var rows = tbody.rows;
         for (var r = 0; r < 4; r++) {
             var row = rows[r];
             for (var c = 0; c < 4; c++) {
                 var cell = row.cells[c];
                 cell.firstChild.value = subset[i++]; // the only part changed
             }
         }
     }
    

    when your html looks like:

    <table id="alphabetTable" border="1">
        <thead>
            <tr>
                <th>Header1</th>
                <th>Header2</th>
                <th>Header3</th>
                <th>Header4</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
            </tr>
            <tr>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
            </tr>
            <tr>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
                <td><input type = "text" size="1" /></td>
            </tr>
        </tbody>
    </table>
    

    As you could see, I rely on firstChild property, however it can be dangerous, e.g. when your html looks like:

    <td> <input type = "text" size=1 /> </td>
    

    then at least FF returns <TextNode textContent=" "> as firstChild. Not to depend on this issue you can go with:

    cell.getElementsByTagName("input")[0].value = subset[i++]; 
    

    PS. All I wrote was based on info I got from another question, if something wrong – comment and I will try to change 😉

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

Sidebar

Related Questions

I have been trying to use the HTML Agility Pack to parse HTML into
I have been trying to use the new validators that are now included with
I have been trying to use fflush to make a progress bar. To test
I have been trying to use PHPUnit to test an application. I have it
I have been trying to use the step() method on Date object to retrieve
I have been trying to use reflection for a specifiec Field in the android.os.build
I have been trying to use the gem 'character-encodings' which doesn't build in 1.9.2
How would you send long text from jquery to mysql becuase i have been
I am trying to change the theme for my exposed filters for a particular
I have a raw audio file captured from a camera in the format u-law

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.