Free Web Hosting PHP/mySQL
GlobalWeb.com.ru Forum Index GlobalWeb.com.ru
Free Web Hosting :: Commercial Web Hosting :: PHP/mySQL :: CGI/Perl
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ticker tape Script

 
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> Javascript
Author Message
Blaq



Joined: 27 Feb 2004
Posts: 45

PostPosted: Mon Mar 01, 2004 9:57 am    Post subject: Ticker tape Script Reply with quote

Simply add the below where you wish the ticker tape to appear:

<script language="JavaScript1.2">

/*
Ticker Tape script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)
var tickercontents=new Array()
tickercontents[0]='See what\'s New at Dynamic Drive. <a href="http://dynamicdrive.com/new.htm">[Read more]</a>'
tickercontents[1]='Browse the most popular scripts on Dynamic Drive <a href="http://dynamicdrive.com/hot.htm">[Read more]</a>'
tickercontents[2]='Link back to Dynamic Drive! <a href="http://dynamicdrive.com/link.htm">[Read more]</a>'

//configure the below 2 variables to set the width/background color of the ticker
var tickerwidth='65%' //in "px" or "%"
var tickerbgcolor='lightblue'

//configure the below variable to determine the delay between ticking of messages (in miliseconds
var tickdelay=3000

////Do not edit pass this line////////////////

var currentmessage=0

function changetickercontent(){
if (document.layers){
document.tickernsmain.document.tickernssub.document.write(tickercontents[currentmessage])
document.tickernsmain.document.tickernssub.document.close()
}
else
crosstick.innerHTML=tickercontents[currentmessage]

if (currentmessage==tickercontents.length-1) currentmessage=0
else currentmessage++
setTimeout("changetickercontent()",tickdelay)
}

function start_ticking(){
if (document.layers)
document.tickernsmain.visibility="show"
else
crosstick=document.getElementById? document.getElementById("tickerie") : document.all.tickerie
changetickercontent()
}

if (document.all||document.getElementById)
document.write('<div id="tickerie" style="width:'+tickerwidth+'; background-color:'+tickerbgcolor+'"></div>')
window.onload=start_ticking
</script>


<ilayer id="tickernsmain" width=&{tickerwidth}; bgColor=&{tickerbgcolor}; visibility=hide><layer id="tickernssub" width=&{tickerwidth}; left=0 top=0></layer></ilayer>
Back to top
View user's profile Send private message
sam
Banned


Joined: 01 Mar 2004
Posts: 51
Location: IL

PostPosted: Mon Mar 01, 2004 1:03 pm    Post subject: Reply with quote

Blaq-- can you please put your code in the code tags? Exclamation
_________________
Back to top
View user's profile Send private message Visit poster's website
macabist
Banned


Joined: 01 Mar 2004
Posts: 35

PostPosted: Mon Mar 01, 2004 2:02 pm    Post subject: Reply with quote

thx!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> Javascript All times are GMT
Page 1 of 1

 


Free Web Hosting, Commercial Web Hosting, PHP/mySQL Copyright © 2009
Free Scripts Directory | Free Software Downloads | Newsgroups Directory | Optel.net | Mirroraty | Cruised.net | Hardware Keylogger