DB opgave
HejEr der nogen af Jer hajer der kan/vil lav dette lille script om, så data i stedet for statisk input forneden, hentes fra en AccessDB. I DB er en tabel "Nyheder" med to felter: "Overskrift" og "Nyhed", - begge tekstfelter.
Det skal være sådan at alle poster i DB bruges og "nyhed", skal skilles ad med <br> for hver 33 karakterer.
---------
<html>
<head>
<script lanuage="JavaScript" src="dynapi/js/dynlayer.js"></script>
<script lanuage="JavaScript" src="dynapi/js/newsticker.js"></script>
<script lanuage="JavaScript">
<!--
onload = init
function init() {
ticker.activate()
}
var i0 = '<span class="tickerstyle"><b>Today\'s Lotto Numbers:</b>'+
'<br>Lotto 649: 3 14 18 22 34 39'+
'<br>Encore: 1 4 7 7 9 3'+
'<br>Pick 3: 6 9 5'+
'</span>'
var i1 = '<span class="tickerstyle"><b>Tomorrow\'s Lotto Numbers:</b>'+
'<br>Lotto 649: 11 15 19 29 31 33'+
'<br>Encore: 8 8 7 2 3 3 2'+
'<br>Pick 3: 9 3 7'+
'<br>(yes this is a smart news ticker)'+
'</span>'
var i2 = '<span class="tickerstyle"><b>Tonight\'s Weather:</b>'+
'<br>Partly cloudy, dry'+
'<br>Temperature: 33'+
'<br>Humidex: 40'+
'<br>Wind: 3 km/h'+
'</span>'
ticker = new NewsTicker(15,500,160,80)
ticker.addItem(i0)
ticker.addItem(i1)
ticker.addItem(i2)
ticker.build()
writeCSS(
ticker.css
)
//-->
</script>
<style type="text/css">
<!--
.tickerstyle {font-family:"Arial"; font-size:8pt; color:#000066;}
-->
</style>
</head>
<body bgcolor="#ffffff">
<script language="JavaScript">
document.write(ticker.div)
</script>
</body>
</html>
-----------------
mvh
Lars