Salve, cerco un semplicissimo script per le news lette da db access, Ho trovato qualcosa del genere ma non mi visualizza nulla se qualcuno potrebbe aiutarmi grazie
<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("/freeasp_files/freeasp_database/database.mdb")
'set connession to database
Set objConn=Server.CreateObject("ADODB.Connection")
'open connession to database
objConn.Open cstring
Set rs = Server.CreateObject("ADODB.Recordset")
nometabella="lorem" ' inserisci qui il nome della tabella da vedere
SQL = "select * from "&nometabella&"" 'where ......"
'apro il rs
rs.Open sql, objConn
stringa = ""
do until rs.eof
For Each campo in rs.Fields
if not (campo.name = "id" or campo.name = "campo6") then
'non stampa i campi non richiesti
stringa = stringa & campo &""
end if
next
rs.movenext
loop
'chiudo tutto
rs.close
set rs=nothing
objConn.close
set objconn=nothing
%>
<script language="JavaScript1.2">
//Larghezza del testo scorrevole(in pixels)
var marqueewidth=700
//Altezza del testo scorrevole (in pixels, solo Netscape)
var marqueeheight=20
//Velocit?
var speed=6
//Contenuto
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.write('<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>
</body>
</html>

Rispondi quotando
