scrolling text

User 130687 Photo


Registered User
13 posts

in my old version of html editor there was a scrolling text script but I can not seem to find it in the new version. Does anyone have this?
User 148353 Photo


Ambassador
808 posts

Do you mean the sideways scrolling? That is the <marquee> tag is depricated. It still works in many browsers, but I don't know if it works in all browsers.

http://www.htmlcodetutorial.com/_MARQUEE.html
"Time heals everything. Know who said that? My Latin teacher at barber college!"
- Floyd Lawson

Widoktadwat - "Plays Well With Others"

User 364143 Photo


Guest
5,410 posts

The marquee tag works in the most popular browsers even though it is depreciated. It not only scrolls horizontally but vertically as well. You can include on hover and click events as well. I use this for advertisements.
CoffeeCup... Yeah, they are the best!
User 130687 Photo


Registered User
13 posts

too funny ... a simple marquee script. I had used the following script but somehow i have messed it up and it does not work but I think the marquee will be better.

<script type="text/javascript">

//Customize your message here. Use any HTML desired:
var themsg='<span style="font:italic 22px Arial;color:white;">Website currently under reconstruction, please check back later
</span>'
var speed=6 //speed of scroller (1-10 or more)
var loops=2 //specify number of times message scrolls across screen (an integer or "infinite")
function populatescroller(){
var windowwidth=iecompattest().clientWidth
document.getElementById("alertit").innerHTML=themsg
document.getElementById("alertit").style.width=windowwidth
document.getElementById("alertit").scrollAmount=speed
document.getElementById("alertit").scrollDelay=20
document.getElementById("alertit").loop=loops
document.getElementById("alertit").onfinish=function(){
document.getElementById("alertit").style.visibility="hidden"
}
}

function iecompattest(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body
}

if (document.all && document.getElementById){
window.onload=populatescroller
window.onresize=populatescroller
}

</script>
User 38401 Photo


Senior Advisor
10,951 posts

Eventually the Marquee script will probably not work as browsers get newer, but we all know how long that can take right? *notes all the people still on IE6 lol*

There are quite a few little scripts out there already made for things like this also that are pretty slick to try. A google search for the words "website" and "ticker" will probably take you to quite a few :)
User 3004957 Photo


Registered User
851 posts

You are probably talking about the code snippets that used to be included with the editor. They have been removed from the editor's library apparently as some didn't conform to the W3C conventions; it seems CC would prefer their editor outputs valid sites, which is an honourable stance considering many other editors generate code to render properly in Internet Explorer, effectively excluding all other browsers. This is a smart decision, even though some of those snippets were darn handy!

Various free scripts can still be found and used if the marquee tag is not versatile enough to do what you want to do.

Dave.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.