ciao a tutti
tempo fa ho creato una sezione news solo testuale con database access..beh ora il cliente vuole anche le immagini.
ho provato inserendo una nuova colonna, tipo testo, nel database e l'ho chiamata "foto". qui ho scritto solo il nome del file "01.jpg".
la pagina visualizza tutto tranne l'immagine e segna questo errore:
Errore di run-time di Microsoft JScript error '800a1391'
'rsNews' non è definito
/news/new_ita.asp, line 104
di seguito lo script (la riga 104 in blu)
<%@LANGUAGE = JScript%>
<%
var id = parseInt(Request.QueryString("id"));
var Mostra_News = Cn.Execute("SELECT * FROM news WHERE id LIKE " + id);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Vertical Vision International</title>
<link href="../style_interno.css" rel="stylesheet" type="text/css">
<script language=javascript src=activateSF123.js></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th bgcolor="667788" scope="col">[img]../images/barra_grigia.gif[/img]</th>
</tr>
<tr>
<th height="84" scope="col">[img]../images/new_top.jpg[/img]</th>
</tr>
<tr>
<th bgcolor="778899" scope="col">[img]../images/barra_grigia.gif[/img]</th>
</tr>
<tr>
<th bgcolor="#000000" scope="col">[img]../images/barra_nera.gif[/img]</th>
</tr>
<tr>
<th scope="col"><table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="900" height="100">
<param name="movie" value="../menu_ita.swf">
<param name="quality" value="high">
<embed src="../menu_ita.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="900" height="100"></embed>
</object></th>
</tr>
</table></th>
</tr>
<tr>
<th scope="col"><table width="900" height="400" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/new.jpg" class="sfondo_tabella">
<tr>
<td width="100" align="center" valign="top"><table width="80" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" class="titolopagina"><div align="right">NEWS</div></td>
</tr>
</table>
<table width="80" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="top">
archivio</p></td>
</tr>
</table></td>
<td width="100" align="center" valign="top" background="../images/news_ver.jpg" class="sfondo_td_grigio"><table width="80" height="28" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" class="titolopagina"></td>
</tr>
</table>
<table width="80" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" class="testonormale">[img]../images/vai.png[/img]</td>
</tr>
</table></td>
<td valign="top" bgcolor="#FFFFFF"><table width="380" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="titolopagina">
<%
if (Mostra_News.EOF)
{
Response.Write("ERRORE 404");
}
else
{
Response.Write(Mostra_News("titolo"));
}
%>
</a></td>
</tr>
<tr>
<td height="40" valign="top" class="data"><%
if (Mostra_News.EOF)
{
Response.Write("<p align='center'>Impossibile trovare la News # " + id + "
Elenco completo delle News</p>");
}
else
{
Response.Write(Mostra_News("data"));
}
%></td>
</tr>
<tr>
<td class="testonormale">
<%
if (Mostra_News.EOF)
{
Response.Write("<p align='center'>Impossibile trovare la News # " + id + "
Elenco completo delle News</p>");
}
else
{
Response.Write(Mostra_News("descrizione"));
}
%> </td>
</tr>
<tr>
<td>[img]<%=rsNews.Fields.Item([/img]" name="foto" border="0" id="foto" /></td>
</tr>
</table></td>
<td width="100" valign="top"></td>
<td width="100" valign="top"></td>
<td width="100" valign="top"></td>
</tr>
</table></th>
</tr>
<tr>
<th height="15" background="../images/barra_bottom.gif" scope="col">[img]../images/barra_bottom.gif[/img]</th>
</tr>
</table>
<script language="javascript">FlashSolver()</script>
</body>
</html>
<%Cn.Close()%>

27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="900" height="100">
Rispondi quotando