?
Solved

I need a nice javascript vertical news scroller with stay feature.

Posted on 2009-05-07
3
Medium Priority
?
421 Views
Last Modified: 2012-05-06
Hi, I need a nice vertical javascript news scroller (some thing similar to www.asdha.org). This scroller should display two news at a time and should stay for few seconds before sliding in next two news. Please refer to some light weight script because i'm already using 2-3, javascript features on this asp.net page.
Thanks
0
Comment
Question by:23-degrees
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 24334162
http://vbarsan.com/multiplescroller.htm

seems to be the basis for what they use
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24334174
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24334215
Here
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
window.onload=start;
 
/* the code was taken from  www.asdha.org but seems to come from 
*Vertical Scroller
*Made available by  http://www.anandsoft.com
*Written by G.Naresh
*The above information may not be removed  ..For help please email: info@anandsoft.com
 
Or taken from http://vbarsan.com/multiplescroller.htm
 
*/
 
var swidth=200;
var sheight=420;
var sspeed=12;  
var restart=sspeed;
var rspeed=sspeed;
var spause=7000;
var sbcolor="#";  
var singletext=new Array();
singletext[0]=' The ASDHA 32nd Annual House of Delegates will be held October 23rd and 24th -- 10/23/2009 <div onclick=window.location="News.aspx?Id=8" style="cursor: hand;" align=right>More ... </div> <br /> ASDHAs Annual Scientific Conference is August 21 - 23, 2009 at the Wig Wam Resort & Spa  -- 8/21/2009 <div onclick=window.location="News.aspx?Id=6" style="cursor: hand;" align=right>More ... </div> '; 
singletext[1]=' ASDHAs Annual Scientific Conference is August 21 - 23, 2009 at the Wig Wam Resort & Spa  -- 8/21/2009 <div onclick=window.location="News.aspx?Id=6" style="cursor: hand;" align=right>More ... </div> <br /> Affiliated Practice Clinic Opens in East Valley -- 2/8/2009 <div onclick=window.location="News.aspx?Id=29" style="cursor: hand;" align=right>More ... </div> '; 
var ii=0;
function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}
function godown(){if(sspeed>rspeed){sspeed=sspeed/2;restart=sspeed;}}
function start(){
if(document.getElementById){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight;ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
else 
if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
else 
if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[0];sizeup=iediv.offsetHeight;iescroll();}}
function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else 
if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed;setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[ii];sizeup=iediv.offsetHeight;iescroll();}}
function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else 
if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}}
function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else 
if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed;setTimeout("ns6scroll()",100);}
else{if(ii==singletext.length-1)ii=0;else ii++;
ns6div.style.top=sheight;ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}
</SCRIPT>
</head>
<body>
<script language="JavaScript">if(document.layers){document.write('<ilayer id="ns4div" width='+swidth+' height='+sheight+' bgcolor='+sbcolor+'><layer id="ns4div1" width='+swidth+' height='+sheight+' onmouseover="sspeed=0;" onmouseout="sspeed=restart"></layer></ilayer>')}
if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);background-color:'+sbcolor+';" onmouseover="sspeed=0;" onmouseout="sspeed=restart"><div id="iens6div" style="position:relative;width:'+swidth+';"></div></div>');}</script>
</body>

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
What monsters are hiding in your child's room? In this article I will share with you a tech horror story that could happen to anyone, along with some tips on how you can prevent it from happening to you.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question