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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:05:24+00:00 2026-06-14T15:05:24+00:00

I have a table with 20 lines, and I wanted their rows to go

  • 0

I have a table with 20 lines, and I wanted their rows to go up (skipping the first row line) after 1 minute the page has loaded.

Ex:

  • Initial

row1
row2
row3

  • First steo

row2
row3
row1

  • second state

row3
row1
row2

  • Final step

row1
row2
row3

I was doing something like this, but I don’t know how to replace the content of the rows.
And if possible do it slowly (gradual would be great but now essencial)

function roll()
 {     
    var oRows = document.getElementById('ultNot').getElementsByTagName('tr');
    var iRowCount = oRows.length;
    //repeat this iRowCount-1?
    for (i=iRowCount; i=2;;i--){
        var tempRow= oRows[i];
        var origRow;
        if (i=rowCount) {
            origRow=oRows[1];
        } else {
            origRow=cRows[i-1];
        }    
         var tempContent=origRow;
         //replace the contents of the rows
    }
 }

thanks a lot for any help


Thanks Razvan, that did the trick. The whole code to do what I wanted (which is to roll the complete group of rows 1 time after 40 seconds):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>
<body>
  <table id="ultNot" style="border: 1">
    <tbody>
      <tr>
        <td>First row</td>
      </tr>
      <tr>
        <td>Second row</td>
      </tr>
      <tr>
        <td>Third row</td>
      </tr>
      <tr>
        <td>Fourth row</td>
      </tr>
      <tr>
        <td>Fifth row</td>
      </tr>
    </tbody>
  </table>
  <input type="button" onclick="iniciaScroll()" value="Click" />
  <script type="text/javascript">
    window.setTimeout(function() {
        iniciaScroll();
        ;
    }, 40000);
  </script>
  <script type="text/javascript">
    var interval;
    var cont = 0;
    var sizeTable = document.getElementById('ultNot').rows.length;
    function roll() {
        var table = document.getElementById('ultNot');
        var rows = table.rows;
        var firstRow = rows[1];
        var clone = firstRow.cloneNode(true);
        table.tBodies[0].appendChild(clone);
        table.tBodies[0].removeChild(firstRow);
        cont++;
        if (cont == (sizeTable - 1)) {
            clearInterval(interval);
            cont = 0;
        }
    }
    function iniciaScroll() {

        interval = window.setInterval(function() {
            roll();
        }, 3000);
    }
  </script>
  <!-- end: portal_latestthreads -->
</body>
</html>
  • 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-14T15:05:26+00:00Added an answer on June 14, 2026 at 3:05 pm

    There probably is a better way but this is all I could come up with until now 🙂

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title></title>
      <script type="text/javascript">
        function roll() {
          var table = document.getElementById('myTable');
          var rows = table.rows;
          var firstRow = rows[0];
          var clone = firstRow.cloneNode(true);
          table.tBodies[0].appendChild(clone);
          table.tBodies[0].removeChild(firstRow);
        }
      </script>
    </head>
    <body>
      <table id="myTable" style="border: 1">
        <tbody>
          <tr><td>First row</td></tr>
          <tr><td>Second row</td></tr>
          <tr><td>Third row</td></tr>
          <tr><td>Fourth row</td></tr>
          <tr><td>Fifth row</td></tr>
        </tbody>
      </table>
      <input type="button" onclick="roll()" value="Click"/>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is along the lines of HTML table horizontal spacing We have an
I have something similar to that: <table> <tr> <td>Hello,<br/>World!</td> </tr> </table> Both lines Hello,
I have a html table in which each line ( <tr> ) represents a
If I have an Invoice Line Items table and a Products table, and I
I have a table of data and i wanted an export function, this application
I want to display the rows of a table on a single line. This
Possible Duplicate: MySQL get row position in ORDER BY I have a table of
I have an SQL table that links students to classes. This table primarily has
I have a table with a DEC field named product_price and I wanted to
I have a table of about a million rows and I need to update

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.