Ciao a tutti
ho un problema che non riesco a capire, ho inserito questo
codice
codice:
<%if len(rs_azienda.Fields.Item("FOTOG")) > 0 then%><%end if%>
per nascondere i campi vuoti del mio database,
il problema è che funzionano tutti tranne per il campo Contenuti
che anche se c'è del testo mi viene nascosto
codice:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim rs_azienda
Dim rs_azienda_numRows
Set rs_azienda = Server.CreateObject("ADODB.Recordset")
rs_azienda.ActiveConnection = MM_conn_foundry_STRING
rs_azienda.Source = "SELECT * FROM tb_azienda ORDER BY Posizione ASC"
rs_azienda.CursorType = 0
rs_azienda.CursorLocation = 2
rs_azienda.LockType = 1
rs_azienda.Open()
rs_azienda_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rs_azienda_numRows = rs_azienda_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Foundry Automation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-attachment: fixed;
background-image: url(../images/sfondobody.jpg);
background-repeat: repeat-y;
background-position: center top;
}
-->
</style>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" align="center" valign="top"><table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="191" rowspan="2" valign="top">
<table width="191" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="191" valign="top">[img]../images/logo.jpg[/img]</td>
</tr>
<tr>
<td valign="top">[img]../images/tit-menu.jpg[/img]</td>
</tr>
</table>
</td>
<td width="558" align="right" valign="top">[img]../images/minimenu.jpg[/img]</td>
</tr>
<tr>
<td valign="top" bgcolor="#000000"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="559" height="173">
<param name="movie" value="../images/Header.swf">
<param name="quality" value="high">
<embed src="../images/Header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="559" height="173"></embed></object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top" bgcolor="#000000"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="191" height="450">
<param name="movie" value="swf/Menu.swf">
<param name="quality" value="high">
<embed src="swf/Menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="191" height="450"></embed></object></td>
<td valign="top"><table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21"></td>
<td width="538"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Home
page > Azienda > Profilo</font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">[img]../images/barrapercorso.jpg[/img]</td>
</tr>
</table>
<table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21"></td>
<td width="538" valign="top"> <%
While ((Repeat1__numRows <> 0) AND (NOT rs_azienda.EOF))
%>
<%if len(rs_azienda.Fields.Item("Titolo")) > 0 then%>
<h1><%=(rs_azienda.Fields.Item("Titolo").Value)%></h1>
<%end if%>
<%if len(rs_azienda.Fields.Item("Sottotitolo")) > 0 then%>
<h2><%=(rs_azienda.Fields.Item("Sottotitolo").Value)%></h2>
<%end if%>
<%if len(rs_azienda.Fields.Item("FOTOP")) > 0 then%>
[img]../admin/my_documents/<%=(rs_azienda.Fields.Item([/img]">
<%end if%>
<%if len(rs_azienda.Fields.Item("Contenuti")) > 0 then%>
<%=(rs_azienda.Fields.Item("Contenuti").Value)%></p><%end if%>
<%if len(rs_azienda.Fields.Item("Testolink")) > 0 then%>
<h3><a href="http://<%=(rs_azienda.Fields.Item("Link").Value)%>" target="_blank">
<%=(rs_azienda.Fields.Item("Testolink").Value)%></a></h3>
<%end if%>
<%if len(rs_azienda.Fields.Item("FOTOG")) > 0 then%>
<h4><a href="../admin/my_documents/<%=(rs_azienda.Fields.Item("FOTOG").Value)%>">
<%=(rs_azienda.Fields.Item("FOTOG").Value)%></a></h4>
<%end if%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_azienda.MoveNext()
Wend
%> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">[img]../images/barra-fouter.gif[/img]</td>
</tr>
<tr>
<td colspan="2"><div align="center">
<font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Azienda
l Foundry nel mondo l Prodotti l Customer care l Contact form
l News l Area download</font></p>
<font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">© 2005 Foundry automation</font></p>
</div></td>
</tr>
</table></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="284,10,355,21" href="../index.htm">
<area shape="rect" coords="375,10,463,21" href="#">
<area shape="rect" coords="482,10,544,22" href="#">
</map>
</body>
</html>
<%
rs_azienda.Close()
Set rs_azienda = Nothing
%>
Ciao
Altamira