<html>
<head>
<title>Scrolling news</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<BODY>
<%
cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mdb-database/archivio.mdb")
'set connession to database
Set objConn=Server.CreateObject("ADODB.Connection")
'open connession to database
objConn.Open cstring
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * From notizie";
'apro il rs
rs.Open sql, objConn, 3, 3 'cursore dinamico
stringa = ""
do until rs.eof
For Each campo in rs.Fields
stringa = stringa & campo &" "
next
rs.movenext
loop
%>
<script language="JavaScript1.2">
//Specify the marquee's width (in pixels)
var marqueewidth=700
//Specify the marquee's height (in pixels, pertains only to NS)
var marqueeheight=20
//Specify the marquee's scroll speed (larger is faster)
var speed=6
//Specify the marquee contents
var marqueecontents='<font face="Arial"><big><%=stringa%></big></font>'
if (document.all)
document.write('<center><marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+' </marquee></center>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.w rite('<nobr>'+marqueecontents+'</nobr>')
document.cmarquee01.document.cmarquee02.document.c lose()
thelength=document.cmarquee01.document.cmarquee02. document.width
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.left>=the length*(-1)){
document.cmarquee01.document.cmarquee02.left-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.left=marqu eewidth
scrollit()
}
}
window.onload=regenerate2
</script>
<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">
<layer name="cmarquee02"></layer>
</ilayer>
<%
rs.close
set rs=nothing
'chiudo tutto
objConn.close
set objconn=nothing
%>
</body>
</html>
forse ho sbagliato qualcosa nel codice...
se inserisco una script per visualizzare l'orologio nn mi appare... l'uno o l'altro!!
il mio sito è www.brindisitg24.it
è qui ke vorrei mettere le news..
Grazie!!!