Ciao. Sto cercando di creare un motore di ricerca avanzato che dovrebbe trovare la regione, il colore dei capelli e magari il nome di una modella specifica.
Ho tre domande da fare:
1) Questa dovrebbe essere la più semplice. Vorrei che le righe di ricerca (dove vi sono il nome, la residenza, la regione e l'immagine della modella) abbiano il colore alternato e se è possibile inserirci due un'immagine di sfondo alternate riga per riga.
2) Come faccio a dire al campo nome (che attualmente si chiama cerca) di cercare solo nomi e di cercarli nel database nella tabella nome?
3) Come faccio a dire al campo a discesa di cercare le regioni nel database nella tabella regione?
Questo è il link: http://www.artgallery75.com/modelle2.asp Per capirci provate a digitare Nicole.
Questo è lo script:
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<link rel="stylesheet" href="http://www.agenziaprofessionespettacolo.it/link_modelle.css" type="text/css">
<title>.:: Agenzia Professione Spettacolo - Le Nostre Modelle ::.</title>
</head>
<body>
<form method="POST" action="modelle2.asp">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" width="450" height="21" style="border-collapse: collapse" bgcolor="#99CCFF">
<tr>
<td width="450" height="52" colspan="2" background="http://www.agenziaprofessionespettacolo.it/images/cerca_modella.jpg">
<p align="center"></td>
</tr>
<tr>
<td width="182" height="32">
<p align="right" style="margin-right: 5">Nome Modella: </td>
<td width="268" height="32">
<p style="margin-left: 5">
<input type="text" name="cerca" size="26" style="color: #FFFFFF; font-family: Arial; font-size: 10 pt; font-weight: bold; border: 1px solid #000000; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-image: url('http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg')" value="<%=Request.Form("cerca")%>"></td>
</tr>
<tr>
<td width="182" height="32" bgcolor="#75BAFF">
<p align="right" style="margin-right: 5">Regione: </td>
<td width="268" height="32" bgcolor="#75BAFF">
<p style="margin-left: 5">
<select size="1" name="regione" style="color: #FFFFFF; font-size: 10 pt; font-family: Arial; font-weight: bold; background-color: #2B3E62; background-image: url('http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg')">
<option selected>SELEZIONA LA REGIONE!!!!</option>
<option>Abruzzo</option>
<option>Aosta</option>
<option>Basilicata</option>
<option>Calabria</option>
<option>Campania</option>
<option>Emilia Romagna</option>
<option>Friuli Venezia Giulia</option>
<option>Lazio</option>
<option>Liguria</option>
<option>Lombardia</option>
<option>Marche</option>
<option>Molise</option>
<option>Piemonte</option>
<option>Puglia</option>
<option>Sardegna</option>
<option>Sicilia</option>
<option>Toscana</option>
<option>Trentino Alto Adige</option>
<option>Umbria</option>
<option>Veneto</option>
</select></td>
</tr>
<tr>
<td width="182" height="32">
<p align="right" style="margin-right: 5">Colore Capelli: </td>
<td width="268" height="32">
<p style="margin-left: 5">
<select size="1" name="capelli" style="color: #FFFFFF; font-family: Arial; font-size: 10 pt; font-weight: bold; border: 1px solid #000000; background-color: #2B3E62; background-image: url('http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg')">
<option>SELEZIONA UN COLORE!!!!!</option>
<option>Biondi</option>
<option>Castani</option>
<option>Neri</option>
<option>Rossi</option>
</select></td>
</tr>
<tr>
<td width="450" height="1" colspan="2" background="http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg">
<p align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="40%" id="AutoNumber2">
<tr>
<td width="50%">
<p align="right"><a href="javascript:;" onClick="reset()">
</a></td>
<td width="450">
<input name="invia" type="image" value="Invia" src="http://www.agenziaprofessionespettacolo.it/images/invia.jpg" alt="INVIA LA RICERCA"></td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</center>
</div>
<input type="hidden" name="tipo" value="cerca">
</form>
<%
tipo = Request.Form("tipo")
If Trim(tipo) = "cerca" then
'Connessione al database
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("/fpdb/casting1.mdb")
'Parola da cercare
cerca = Request.Form("cerca")
SQL = "SELECT * FROM modelle WHERE (nome LIKE '%" & cerca & "%' OR regione LIKE '%" & cerca & "%' OR residenza LIKE '%" & cerca & "%' OR regione LIKE '%" & cerca & "%') ORDER by nome"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, cn, 3, 3
If NOT rs.Eof AND Trim(cerca) <> "" then
While NOT rs.EOF
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="540" id="AutoNumber1">
<tr>
<td width="145" height="41" background="http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg" style="border-right: 1px solid #99CCFF; border-left-style:solid; border-left-width:1">
<p style="margin-left: 5"><font color="#FFFFFF">Nome</font></td>
<td width="145" height="41" background="http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg" style="border-left-color: #99CCFF; border-right: 1px solid #99CCFF; border-top-color: #99CCFF; border-bottom-color: #99CCFF">
<p style="margin-left: 5"><font color="#FFFFFF">Residenza</font></td>
<td width="202" colspan="2" height="41" background="http://www.agenziaprofessionespettacolo.it/images/sfondo_modulo2.jpg" style="border-right-style: solid; border-right-width: 1">
<p style="margin-left: 5"><font color="#FFFFFF">Regione</font></td>
<td width="42" bgcolor="#000000" align="center" height="41" style="border-right: 1px solid #000000">
<font color="#FFFFFF">Foto</font></td>
</tr>
<tr bgcolor="<%=intSfondo%>">
<td width="145" style="border-top:2px solid #CCE6FF; border-right:1px solid #55AAFF; border-bottom:1px solid #000000; border-left-style:solid; border-left-width:1" bgcolor="#99CCFF">','popup','resizable=yes,width=740,height=550');"> <p style="margin-left: 5"><span style="font-weight:700; text-decoration:none"><%=rs("nome")%></span></td>
<td width="145" style="border-top:2px solid #CCE6FF; border-right:1px solid #55AAFF; border-bottom:1px solid #000000; " bgcolor="#99CCFF">
','popup','resizable=yes,width=740,height=550');"> <p style="margin-left: 5"><span style="text-decoration:none"><%=rs("residenza")%></span></td>
<td width="146" style="border-top:2px solid #CCE6FF; border-bottom:1px solid #000000; " bgcolor="#99CCFF">
','popup','resizable=yes,width=740,height=550');"> <p style="margin-left: 5"><span style="text-transform: uppercase; text-decoration:none"><%=rs("regione")%></span></td>
<td width="56" style="border-top:2px solid #CCE6FF; border-bottom:1px solid #000000; " bgcolor="#99CCFF">
<p align="center"></td>
<td width="42" align="center" style="border-top: 2px solid #CCE6FF; border-bottom: 1px solid #000000" bgcolor="#000000">
<p align="center"><a href="#" onClick="window.open('<%=Rs("schede")%>','popup',' resizable=yes,width=740,height=550');">
[img]<%=rs([/img]" style="border-style: solid; border-color: #000000; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" width="40" height="40" align="middle" /></a></td>
</tr>
<tr>
<td width="540" colspan="5">
<p align="center"><%
rs.MoveNext
Wend
Else
Response.Write("Pagina non trovata")
End If
rs.Close
set rs = Nothing
cn.Close
set cn = Nothing
End if
%>
</p></td>
</tr>
</table>
</center>
</div>
[/list]
</body>
</html>
Vi ringrazio e se avete bisogno di chiarimenti su photoshop e flash ve li darò molto volentieri..
Grazie a tutti![]()

</a></td>
Rispondi quotando