ho il seguente script che mi funziona correttamente, ma nel momento in cui faccio un nuovo inserimento in data base non va più, mi da un errore
linea: 30
carattere:89
Errore: previsto ";"
codice: 0
sapete dirmi qualcosa?
<html>
<head>
<title>Scrolling news</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../../Inetpub/pagine/stadioradionew/style.css">
<link rel="stylesheet" type="text/css" href="public/pagine/stadioradionew/style.css">
</head>
<BODY bgcolor="#006699" topmargin="0" leftmargin="0">
<%
cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/public/news/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="news" ' inserisci qui il nome della tabella da vedere
SQL = "SELECT TOP 6 * FROM "&nometabella&" ORDER BY id DESC"
'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 = "descrizione" or campo.name = "click") then 'non stampa i campi non richiesti
stringa = stringa & campo &""
end if
next
rs.movenext
loop
%>
<div align="center" style="width: 345; height: 41">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-style:ridge; border-width:2; border-collapse: collapse" id="AutoNumber1" width="100%" align="left" height="27">
<tr>
<td bgcolor="#006699" width="100%" height="14">
<p align="right"><font color="#FFFFFF">
<span style="background-color: #006699">
<script language="JavaScript1.2">
//Specify the marquee's width (in pixels)
var marqueewidth=500
//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=4
//Specify the marquee contents
var marqueecontents='<font face="Arial"><%=stringa%></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",350)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.w rite('<nobr>'+marqueecontents+'</nobr>')
document.cmarquee01.document.cmarquee02.document.c lose()
thelength=document.cmarquee01.document.cmarquee01. document.width
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.left>=the length*(-2)){
document.cmarquee01.document.cmarquee02.left-=speed
setTimeout("scrollit()",300)
}
else{
document.cmarquee01.document.cmarquee02.left=marqu eewidth
scrollit()
}
}
window.onload=regenerate2
</script>
</span>
<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">
</ilayer>
<font color="#FFFFFF" size="0" face="Verdana">
<span style="background-color: #006699">
</span>
</font></font></td>
</tr>
<tr>
<td bgcolor="#006699" width="100%" height="12">
<p align="left">
<font color="#FFFFFF" size="0" face="Verdana">
<span style="background-color: #006699"><font size="1">le newsdi
</font> </span></font><font color="#70B9FD" size="0" face="Verdana"><span style="background-color: #006699">
<font size="1">stadioradio</font></span></font></td>
</tr>
</table>
</center>
</div>
<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">
<layer name="cmarquee02"></layer>
</ilayer>
<%
rs.close
set rs=nothing
%>
</body>
</html>

Rispondi quotando
