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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:04:22+00:00 2026-06-14T01:04:22+00:00

I have an html page that is displayed on a television screen sort of

  • 0

I have an html page that is displayed on a television screen sort of like digital signage. Because of this, everything that is on the page has to be displayed without any user input. I have some records stored in a mySQL database that are displayed in a list format and what I would like to do is when the list gets to big to be displayed, it scrolls up (maybe one line at a time) similar to how a scrolling marquee works.

My ideas on how to do this are fragmented at best, I was hoping someone could point me in the right direction.

btw, I know using the marquee tag is “evil” to a lot of developers, however in this case because there is no user input, I don’t see any other way.

Edit: What I had in mind was to somehow get the div height and then use an if statement to trigger a marquee when the height exceeds a predetermined size.

Edit: Here is what I’ve got so far, using JavaScript to figure out the div height…

<script type="text/javascript">
function divHeight()
{
  var height = document.getElementById("list").offsetHeight;

  if (height > 500)
  {
  activate marquee effect.
  return;
  }
  else
  {
  don't activate marquee effect.
  return;
  }

}
</script>

Then…

<body onLoad="divHeight()">
<div id="list">
my list goes here
</div>
</body>
  • 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-14T01:04:24+00:00Added an answer on June 14, 2026 at 1:04 am

    Ok, I figured out a nice way to do this with very little coding. It uses JavaScript to alter the div contents if the size is exceeded. I’ve got the text that I want to scroll inside div id="scroll" and that div is populated with my data from the mySQL database using php. Here is the script:

    <script type="text/javascript">
    var div = document.getElementById("scroll");
    var height = div.offsetHeight;
    var content = div.innerHTML;
    
    if (height > 500)
    {
    div.innerHTML = "<marquee direction=\"up\" scrollamount=\"2\" height=\"500px\" onfinish=\"redirect()\" loop=\"1\">" + content + "</marquee>";
    }
    
    function redirect()
    {
    refresh=window.setTimeout(function(){location.href=""},0);
    }
    </script>
    

    Since this application is for digital signage, I have it redirect once the full marquee content has been displayed, that’s why I have onfinish="redirect" and then a function to redirect.

    Hopefully this will help someone out, I know I spent a lot of time scratching my head over it.

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

Sidebar

Related Questions

I have an HTML page that roughly looks like this: <div id=rolesRollerBody style=height: 309px;>
This is bugging me ... I have a simple HTML page that has a
i have a page that displays large datasets into html tables. how can i
I have a html page that allows users to submit a file. Below is
I have an html page that open a popup window when the page loads.
I have an HTML page that contains some filenames that i want to download
I have an HTML page that uses AJAX to retrieve messages from a server.
Ok, so as the title says, I have an HTML page that I fetch
I have a page that loads an external HTML page into an iFrame. There
I have n number of select elements in an html page that are used

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.