PDA

View Full Version : DHTML Ticker Split script



Rincewind
08-17-2008, 01:39 PM
1) Script Title: DHTML Ticker script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/generaltick_dev.htm

3) Describe problem: It gives me the code for 2 differenet tickers, i'm only wanting the bottom ticker which bit of the code do I remove so i just have the bottom one?

Nile
08-18-2008, 02:47 AM
Find this in your code:

<script type="text/javascript">

/*Example message arrays for the two demo scrollers*/

var tickercontent=new Array()
tickercontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
tickercontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
tickercontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'

var tickercontent2=new Array()
tickercontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
tickercontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
tickercontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'

</script>
You've just gotta play around with that, delete one variable, then include only one tricker. For example"
Replace the above code with:

<script type="text/javascript">

/*Example message arrays for the two demo scrollers*/

var tickercontent=new Array()
tickercontent[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
tickercontent[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
tickercontent[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'

</script>

And replace:


<script type="text/javascript">

//new domticker(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds, optionalfadeswitch)

new domticker(tickercontent, "domticker", "someclass", 3000, "fadeit")
document.write("<br />")
new domticker(tickercontent2, "domticker2", "someclass", 3000)
</script>

With:

<script type="text/javascript">

//new domticker(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds, optionalfadeswitch)

new domticker(tickercontent, "domticker", "someclass", 3000, "fadeit")
</script>
Then delete the highlighted if you don't want it to fade.