Salve a tutto il forum
gestico un archivio storico e quando faccio una ricerca mirata
su un certo argomento mi si mostra sia il risultato della mia ricerca
insieme a tutto il contenuto del fascicolo che lo contiene.
Ora sarebbe bello che invece nell'anteprima dei risultati della ricerca mi si mostri solo la stringa di testo che riguarda l'oggetto della ricerca stessa (e non tutto il contenuto del fascicolo).
Spero di essere chiaro, cmq per precisione metto il codice della pagina motore ( con evidenziato la riga che gestisce il contenuto del fascicolo)
spero ke mi possiate dare una mano.
ciao
(se puo servire posto il link del sito, ma prima aspetto una vostra conferma su questo)

codice:
<%@ Language=VBScript %> 
<% response.buffer=true %>
<% Server.ScriptTimeout = 300 %>


<html>
<head>
<title>ASCM - Ricerca intelligente documenti</title>
<style type="text/css">
<!--
body {
	font-family: "Century Gothic";
	color: #000099;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">


<font size="6">Archivio storico comunale</font></p>
<h2>Assessorato alla cultura</h2>
<div id="Layer1" style="position:absolute; left:536px; top:42px; width:205px; height:40px; z-index:3"> 
  <p align="center"></p>
  <p align="center"><font color="red"><font size="2" face="Century Gothic">L'archiviazione 
    &egrave; in corso</font></font></p>
  <p align="center"><font size="2" face="Century Gothic"><font color="red"> 
    <marquee>
    Aggiornato il 22-03-2005 
    </marquee>
    <marquee>
    </marquee>
    </font><font color="red"> 
    <marquee>
    </marquee>
    </font></font></p>
</div>
<h3>Citt&agrave; di Monreale</h3>


Nuova ricerca</p>


<font size="2" face="Century Gothic"><font size="3">Home</font></font> 
  <font color="red"></font></p>


  <div align="center"> </p> 
<div id="Layer2" style="position:absolute; left:10px; top:336px; width:165px; height:202px; z-index:4"> 
  <table width="98%" height="61" cellpadding="1" cellspacing="1">
    <tr> 
      <td><p align="left" class="archivio"><font size="2"><a href="mailto:archiviomonreale@libero.it"><font face="Century Gothic">Info 
          e richieste all' ASCM</font></a></font></p>
        <p align="left" class="archivio"><font color="red" size="2" face="Century Gothic">Realizzazione 
          e cura: Webmaster </font></p>
        <p align="left" class="archivio"><font color="red" size="2" face="Century Gothic"><a href="mailto:t_corso@libero.it">Corso 
          Antonino</a></font></p>
        <p align="left" class="archivio"><font color="red" size="2" face="Century Gothic">Progetto 
          database</font></p>
        <p align="left" class="archivio"><font color="red" size="2" face="Century Gothic"><a href="mailto:naniac@tin.it">Ing. 
          G. Nania</a></font></p></td>
    </tr>
  </table>
</div>
<TABLE WIDTH="672" CELLPADDING="4" CELLSPACING="4" BORDER="0" align="center">
  <TR height="60" valign="middle"> 
    <TD width="656" align="center"> <h1><font face="Century Gothic" size="6" color="red">Risultati 
        della ricerca inoltrata</font></h1></TD>
  <TR> 
    <TD> <font face="Century Gothic"> 
      <%
			iPageSize = 10 'NUMERO RECORD PER PAGINA

			If Request.QueryString("page") = "" Then
				iPageCurrent = 1
			Else
				iPageCurrent = CInt(Request.QueryString("page"))
			End If

categoria = request("categoria") 
contenuto = request("contenuto")
data = request("data")  
if contenuto="" then contenuto="%"
if data="" then data="%"
if categoria="Tutte" then categoria="%"%>
      <%
			strsql="select * FROM tabella1 where contenuto like '%"&contenuto&"%' and categoria like '%"&categoria&"%' and data like '%"&data&"%' ORDER BY data asc"

			Set objRS = Server.CreateObject("ADODB.Recordset")
			objRS.PageSize = iPageSize
			objRS.CacheSize = iPageSize
			objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText

			reccount = objRS.recordcount
			iPageCount = objRS.PageCount

			If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
			If iPageCurrent < 1 Then iPageCurrent = 1

			If iPageCount = 0 Then
				Response.Write "

<table><td><font face='verdana' size='2' color='#000000'>Non sono stati trovati documenti corrispondenti.

<a href=form_ricerca.asp>Torna alla ricerca</a></td></table></p>"
			Else
				objRS.AbsolutePage = iPageCurrent
				iRecordsShown = 0
				%>
      </font> <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr> 
          <td height="47"> <table width="100%" height="48" border="0" cellpadding="2" cellspacing="1">
              <tr height="22"> 
                <td WIDTH="25%"><font face="Century Gothic" size="2" color="red">N. 
                  documento </font></td>
                <td WIDTH="38%"><font face="Century Gothic" size="2" color="red">Contenuto 
                  documento </font></td>
                <td WIDTH="19%" align="center"><font face="Century Gothic" size="2" color="red">Categoria</font></td>
                <td WIDTH="9%" align="center"><font face="Century Gothic" size="2" color="red">Data</font></td>
                <td WIDTH="9%" align="center"><font color="red" size="2" face="Century Gothic">Busta 
                  n&deg; </font></td>
              </tr>
              <%
								'SI VISUALIZZA IL CONTENUTO DELLA STRINGA SQL
								'ALL'INTERNO DELLA TABELLA PRIMA DEFINITA
								cont=1
								Do While iRecordsShown < iPageSize And Not objRS.EOF
									Dim Rig, bg
									Rig = Rig + 1
									If Rig Mod 2 = 0 then
									
									Else
											
									End if
									
										
									Response.Write "<tr bgcolor = " & bg & "><td><font color='#000000' face='Verdana' size='1'>" & (iPageSize*iPageCurrent)-iPageSize+Cont & "</font></td>"
									
									
 Response.Write "<td><font color='#000000' face='Verdana' size='1'><a href='doc.asp?id="& objRS("id") &"'>" & objRS("contenuto") & "</font></td>"
									
									
									Response.Write "<td align='center'><font color='#000000' face='Verdana' size='1'>" & objRS("categoria") & "</font></td>"
									Response.Write "<td align='center'><font color='#000000' face='Verdana' size='1'>" & objRS("data") & "</font></td>"
									Response.Write "<td align='center'><font color='#000000' face='Verdana' size='1'>" & objRS("numero") & "</font></td>"
									
									Cont = Cont + 1
									'POSIZIONAMENTO ALLA RIGA SUCCESSIVA DEL DB
									iRecordsShown = iRecordsShown + 1
									objRS.MoveNext
								Loop
								'PULIZIA DEGLI OGGETTI ADO
								objRS.Close
								Set objRS = Nothing
								%>
            </table></td>
        </tr>
      </table>
      <font face="Century Gothic"> 
      <%End if%>
      </font> 

 <font face="Century Gothic"> 
        <%If ipagecount <> 1 Then%>
        </font>
      <center>
        <table>
          <tr valign="middle"> 
            <td width="50%" align="center" valign="middle"><font face="Century Gothic" size="1" color="#000000"> 
              [ 
              <%if iPageCurrent-2 > 0 and iPageCurrent > 2 then%>
              [img]../image/first.gif[/img] 
              <%end if%>
              <%if iPageCurrent > 1 then%>
              [img]../image/pre.gif[/img] 
              <%end if%>
              <%if iPageCount > 2 then
								if iPageCurrent-2 < 1 then da_pag = 1 else da_pag = iPageCurrent-2
								if iPageCurrent+2 > iPageCount then fino_a_pag = iPageCount else fino_a_pag = iPageCurrent+2
							else
								da_pag = 1
								fino_a_pag = iPageCount
							end if%>
              <%for i = da_pag to fino_a_pag%>
              <%if i = iPageCurrent then%>
              <font color="red"><%=i%></font> 
              <%else%>
              <%end if%>
              <%next%>
              <%if iPageCurrent > 0 and iPageCurrent < iPageCount then%>
              [img]../image/next.gif[/img] 
              <%end if%>
              <%if iPageCurrent+1 < iPageCount then%>
              [img]../image/last.gif[/img] 
              <%end if%>
              ] </font></td>
          </tr>
          <tr> 
            <td colspan="2" align="center"><font face="verdana" size="1" color="#000000"> 
              <center>
                <font face="Century Gothic"> Pagina <font color="#FF0000"><%=iPageCurrent%></font></font> <font face="Century Gothic">di 
                <font color="#FF0000"><%=iPageCount%></font></font> 
              </center>
              </font></td>
          </tr>
        </table>
      </center>
      <font face="Century Gothic"> 
      <%end if%>
      <%
			objConn.Close
			Set objConn = Nothing
			%>
      </font></TD>
  </TR>
</TABLE>		


</p>
<table width="55%" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="70%" height="19"> <div align="center"> 
        <script language="JavaScript" type="text/javascript">
function printit(){  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}
</script>
        <script language="JavaScript1.2" type="text/JavaScript1.2">



var message = "Stampa il risultato della ricerca";

function printpage() {
window.print();  
}

document.write("<form><input type=button "
+"value=\""+message+"\" onClick=\"printpage()\"></form>");

</script>
      </div></td>
  </tr>
</table>


</p>
</body>
</html>