Forum Moderators: open

Message Too Old, No Replies

horizontal scrolling message with hyperlinks

         

wolf

2:08 pm on Aug 29, 2004 (gmt 0)

10+ Year Member



Hello!
I am looking for a javascript with which I can let a few messages (news flashes) roll over the screen horizontally. If there are for example 3 messages, I would like that they can be clicked on separately so that you are directed to the right page containing more information on the news flash.
Is this possible? And if so, can someone explain how to do this as if you were talking to a 5 year old? ;-) Or if you have other ideas to get approx. the same effect...
Thanks a lot!
WWWolf

j4mes

3:59 pm on Aug 29, 2004 (gmt 0)

10+ Year Member




<marquee>
<a href="foo.html">link</a>
<a href="bar.html">another link</a>
</marquee>

Stick whatever HTML you like between the marquee tags and it'll scroll nicely across the screen. Google for it if you want it scroll the other way or bounce, or stay between two points or whatever, there's plenty.

J.

Yes, I know this is an evil Microsoft tag but it's supported by everything now, so that's OK :)

wolf

4:24 pm on Aug 29, 2004 (gmt 0)

10+ Year Member



no way! it can't be that simple... it just can't! ... uhm... it is! :-) thanks!

j4mes

8:45 pm on Aug 29, 2004 (gmt 0)

10+ Year Member



Hehe no problem. Here are some complexities to make you feel a bit better :)

<marquee
width="number¦percentage"
behavior="scroll¦alternate"
direction="left¦right"
bgcolor="name¦hex"
>

James.

Rambo Tribble

10:04 pm on Aug 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you'd really like more complexity, try this vertical scroller, ala "Star Wars":

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function strtScroll(){
scl_txt=document.getElementById("sclTxt");
end_pt=scl_txt.offsetHeight;
strt_pt=end_pt;
divScroll();
}
function divScroll() {
if (strt_pt<-end_pt) strt_pt=end_pt;
strt_pt--;
scl_txt.style.top=(strt_pt+"px");
tOVal=setTimeout("divScroll()",10); // larger number = slower scroll
}
window.onload=strtScroll;
</script>
</head>
<body>
<div style="position:relative;top:50px;width:335px;height:360px;overflow:hidden;">
<div id="sclTxt" style="position:relative;font-family: arial, sans-serif; font-size:200%;color:#808080;">
AQUATIC STAKEHOLDERS' MEETING&nbsp; June 13: The Unified
Albenon Aquatic Task Force will be holding a meeting to address the future of
aquatics in Albenon. See the Event Calendar for details.
</div>
</div>
</body>
</html>