PDA

View Full Version : Unable to View Memory Ticker



Drexxus
05-19-2008, 08:22 PM
1) Script Title: Memory Ticker (Home -> Scrollers)

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

3) Describe problem: I've copied the ticker CSS and script onto a website I'm currently working on, but the ticker doesn't show up at all.

I'm pretty sure the problem isn't my browser (Safari v3.1.1?), since I can view the demo on DD just fine.

Here's a test I was working on: http://arenatournament.webs.com/scroller.htm



<html>
<head>
<title>Wrath of the Lich King Info</title>
<body background="http://i161.photobucket.com/albums/t212/Razerai/Wrath/parchment-light3.jpg">

<style type="text/css">

#memoryticker{
background-color: lightyellow;
width: 450px;
font: bold 12px Verdana;
/*Tip: add in height attribute here for multiple line scroller*/
border: 1px solid black;
padding: 3px;
/*Change 0.7 below to a different number if desired (0.7=0.7 seconds)*/
/*Remove below line to remove transitional effect in IE. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)
}

</style>

<table width="885" height="25" align="center">
<tr>
<td>


<script type="text/javascript">

/***********************************************
* Memory Ticker script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)
//Backslash any apostrophes within your text (ie: I\'m the king of the world!)
var tickercontents=new Array()
tickercontents[0]='<a href="http://www.wowinsider.com/2008/05/17/wotlk-friends-and-family-alpha-patch-notes-leaked/">WotLK Friends and Family Alpha Patch Notes leaked</a> - They're pretty barebones, but there's some intriguing information to be found.</a>'
tickercontents[1]='<a href="http://www.mmo-champion.com/index.php?topic=7361.0">WotLK Preview Part 3</a> - More information from the previews and interviews on Worldofwar.net and IGN.com.</a>'
tickercontents[2]='<a href="http://www.wowinsider.com/2008/05/14/vivendi-earning-statement-hints-wotlk-to-be-released-in-second-h/">Vivendi earning statement hints WotLK to be released in second half of 2008</a> - First time an official confirmation of a release time frame has come out.</a>'
tickercontents[3]='<a href="http://www.wowinsider.com/2008/05/12/wrath-will-have-mounts-with-passengers/">Wrath will have mounts with passengers</a> - Some Wrath mounts will be able to take passengers (!), and ground passenger mounts will work in the old world as well.</a>'
tickercontents[4]='<a href="http://boards.worldofraids.com/topic-13241-1.html">WotLK Quests</a> - Jeffrey "Tigole" Kaplan and Tom "Kalgan" Chilton give some examples of the new WotLK quests</a>'
tickercontents[5]='<a href="http://www.vimeo.com/992930">WotLK HD Trailer</a> - Ten minutes of the new zones and dungeons.</a>'
tickercontents[6]='<a href="http://www.wowinsider.com/2008/05/12/the-nexus-added-to-the-official-wrath-page/">The Nexus added to the official Wrath page</a> - Blizzard has added The Nexus to the dungeons listing on their official Wrath site.</a>'
tickercontents[7]='<a href="http://boards.worldofraids.com/topic-13205-1.html">WotLK Preview Movie - Guided Tour</a> - Each time stamp has a description of what you will see in the new WotLK trailer.</a>'
tickercontents[8]='<a href="http://boards.worldofraids.com/topic-13155-1.html">New batch of WotLK Info</a> - World of Raids has provided us all with a great forum topic listing many recent announcements that have to do with WotLK.</a>'

var persistlastviewedmsg=1 //should messages' order persist after users navigate away (1=yes, 0=no)?
var persistmsgbehavior="onload" //set to "onload" or "onclick".

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

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

var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
var currentmessage=0

function changetickercontent(){
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Apply()
crosstick.innerHTML=tickercontents[currentmessage]
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Play()
currentmessage=(currentmessage==tickercontents.length-1)? currentmessage=0 : currentmessage+1
var filterduration=(crosstick.filters&&crosstick.filters.length>0)? crosstick.filters[0].duration*1000 : 0
setTimeout("changetickercontent()",tickdelay+filterduration)
}

function beginticker(){
if (persistlastviewedmsg && get_cookie("lastmsgnum")!="")
revivelastmsg()
crosstick=document.getElementById? document.getElementById("memoryticker") : document.all.memoryticker
changetickercontent()
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function savelastmsg(){
document.cookie="lastmsgnum="+currentmessage
}

function revivelastmsg(){
currentmessage=parseInt(get_cookie("lastmsgnum"))
currentmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1
}

if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=savelastmsg

if (document.all||document.getElementById)
document.write('<div id="memoryticker" '+divonclick+'></div>')
if (window.addEventListener)
window.addEventListener("load", beginticker, false)
else if (window.attachEvent)
window.attachEvent("onload", beginticker)
else if (document.all || document.getElementById)
window.onload=beginticker

</script>
</body>
</head>
</html>

Please help :confused:.

Thanks in advance.

ddadmin
05-19-2008, 08:45 PM
Inside your ticker contents, any apostrophes need to be backslashed (\'), to tell the script to treat them as literal apostrophes. So for example, in your first ticker content, add to it the part in red:


tickercontents[0]='<a href="http://www.wowinsider.com/2008/05/17/wotlk-friends-and-family-alpha-patch-notes-leaked/">WotLK Friends and Family Alpha Patch Notes leaked</a> - They\'re pretty barebones, but there\'s some intriguing information to be found.</a>

Do this for all occurrences of single apostrophes within your user defined content.

Drexxus
05-19-2008, 08:51 PM
Thank you so much, that did it!:D