PDA

View Full Version : Ajax XML Ticker



debstl
04-05-2006, 10:49 PM
http://www.dynamicdrive.com/dynamicindex2/ajaxticker.htm

What am I doing wrong? I followed the steps, but I'm still unable to see the scroller.

I inserted this code into the head section:


<style type="text/css">

/*Example CSS for demo ticker*/

#ajaxticker1{
width: 200px;
height: 100px;
border: 1px ridge black;
padding: 5px;
background-color: #FEEEB8;
}

#ajaxticker1 div{ /*IE6 bug fix when text is bold and fade effect (alpha filter) is enabled. Style inner DIV with same color as outer DIV*/
background-color: #FEEEB8;
}

.someclass{ //class to apply to your scroller(s) if desired
}

</style>

<script src="ajaxticker.js" type="text/javascript">

/***********************************************
* Ajax Ticker script (txt file source)- Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

</script>

and inserted this into the body section:


<script type="text/javascript">

var xmlfile="tickercontent.txt" //path to ticker txt file on your server.

//ajax_ticker(xmlfile, divId, divClass, delay, optionalfadeornot)
new ajax_ticker(xmlfile, "ajaxticker1", "someclass", 3500, "fade")
</script>

Then I saved the ajaxticker.js file and the tickercontent.txt file. I didn't change a thing because I just wanted to view it on my site. But all I see is a blank page. Can someone tell me what I'm missing?

Thanks in advance.

Twey
04-06-2006, 12:10 AM
Sekai.

debstl
04-06-2006, 12:53 AM
Ajax XML Ticker (txt file source)
http://www.dynamicdrive.com/dynamicindex2/ajaxticker.htm

Test page
http://edgarrenteria.com/scroller.html

ddadmin
04-06-2006, 06:23 AM
From what I can tell the problem is simply that the line to invoke the scroller in the BODY is actually commented out:


<script type="text/javascript"> var xmlfile="tickercontent.txt" //path to ticker txt file on your server. //ajax_ticker(xmlfile, divId, divClass, delay, optionalfadeornot) new ajax_ticker(xmlfile, "ajaxticker1", "someclass", 3500, "fade") </script>

Change that to:


<script type="text/javascript">
var xmlfile="tickercontent.txt" //path to ticker txt file
new ajax_ticker(xmlfile, "ajaxticker1", "someclass", 3500, "fade")
</script>

debstl
04-07-2006, 04:46 AM
Thanks for you help, seems to be working now.