http://www.dynamicdrive.com/dynamici...andticker2.htm
I am trying to modify the ticker that George provided to pull the ticker contents from a mysql database. I have done this before in other tickers but for some reason I just can't get this one to work. I am not the best with javascript so feel free to laugh.
top of the page
then body and style... then scriptPHP Code:<?php
$ticker = mysql_query("SELECT * FROM table_ticker WHERE display =1 ORDER BY display_order");
if (mysql_num_rows($ticker)>0) {
This is how it is originally done in the tickerCode:<script language="JavaScript1.2"> /*********************************************** * George's Expandable Ticker- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ //configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted) var tickercontents=new Array() <?php $i = 0; while ($tick = mysql_fetch_array($ticker)) { ?> tickercontents[<?php echo $i?>]='<?php echo $tick['content']?>' <?php $i++; } ?>
any help or ideas would be greatly appreciated.Code:var tickercontents=new Array() tickercontents[0]='enter text here' tickercontents[1]='more text here'



Reply With Quote


Bookmarks