Live ticker in HTML?

How can I create a live ticker with a website for the author and a website for the reader because with ChatGPT's help I only get some nonsense but when I implement it like that it doesn't work with the database I can do html and css but the database thing is a bit tricky

(2 votes)
Loading...

Similar Posts

Subscribe
Notify of
5 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ireeb
6 months ago

This is not quite trivial, you need JavaScript at least.

The rough setup would be that a script in the frontend retrieves the data of the ticker (either every X seconds (polling), or with a websocket, so that events can be sent directly to the website), and correspondingly displays the new content on the website. In addition, you need a backend that outputs data from the database and sends it to the frontend (the HTML page). This can also be implemented with JavaScript (with Node.js), or for example with PHP, Python, Go or other programming languages.

Such a system is not based with a few rows of code, which is why ChatGPT cannot spit out short finished code.

In any case, you need basic knowledge of JavaScript and how the communication between a frontend and backend runs.

Ireeb
6 months ago

Sure. HTML itself is quasi static whenever you want to make a website that reacts dynamically to users or can reload data, Javascript is required. For Javascript there is no way around it in web development, as only this language can be used in the browser.

In the backend, you have more or less free choice. Either you can also use Javascript here, or another language. Python’s going, but it doesn’t.

Therefore, I think it would be best for you to learn Javascript basics first.

I also let ChatGPT back and forth, but that only works if you know what you’re doing and what you need to ask ChatGPT. Then you can also judge whether the code of ChatGPT makes sense – and more importantly, you can understand it and learn from it.

SpezialAntwort
4 months ago

That’s all about HTML. But it’s not elegant. Then you should use an iFrame on the page (which shows another HTML page; the live hack). The “Unter-HTML page” can be retrieved automatically via a meta-data with the updated Ticker text.

As a running font, if desired, you would have to set up a CSS animation or use the Microsoft Browser Proprietary Marquee tag. This is not an official HTML, but it still understands every browser.

verreisterNutzer
6 months ago

Say gpt you want to create a live ticker with FastAPI via socket and you should explain it step by step.