Salve a tutti, ho messo nel sito un semplicissimo motore di ricerca interno che in locale funziona benissimo ma che una volta messo sul server da errori a più non posso. Qualcuno può aiutarmi a risolvere il problema? Per provarlo ci si può collegare a http://xoomer.alice.it/diecast124models/ e cliccare su "Search".
Questo è il codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>WebDiscovery - Die-Cast Models - Search</title>
<base target="_self">
</head>
<body background="images/Sfondo.gif" bgproperties="fixed" link="#000080" vlink="#000080" alink="#0000FF">
<div align="center">
<center>
<table border="0" width="347">
<tr>
<td width="341" height="49">
<p align="center">
<p align="center">
[img]images/DiecastModels.gif[/img]<hr>
</td>
</tr>
<div align="center">
<center>
</table>
</p>
<table border="0" width="343">
<td width="97%">
<table border="0" width="340">
<tr>
<td width="51%" align="center">
</td>
</tr>
<tr>
<td width="51%" align="center">
<body>
</td>
</tr>
<div align="center">
<center>
<script>
<!--
var item = new Array();
/* "Nome pagina","percorso","Titolo pagina","parole,chiave,Key,Words ","Descrizione e Commenti"*/
c=0; item[c]=new Array("index.html"," ","Home Page", "index,Main,start,home,ricerca","Home Page");
// Metro
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroAlfaRomeo2000SpiderVeloce.html","Alfa Romeo 2000 Spider Veloce (1971)","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroAlfaRomeoGiulia1600Super.html","Alfa Romeo Giulia 1600 Super (1965)","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroFiat500.html","Fiat 500 F (1965)","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroFiat600.html","Fiat 600 D (1960)","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroInnocentiMiniCooperMK31300.html","Innocent i Mini Cooper MK3 1300","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroLamborghiniMiuraP400.html","Lamborghini Miura P400 (1968)","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroLanciaFulvia.html","Lancia Fulvia 1.3 Coupè Rallye HF (1967)","","Metro / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Metro/124MetroVolkswagenMaggiolino.html","Volkswagen Maggioino 1200 De Luxe Export (1961)","","Metro / 1:24");
// Mondo Motors
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Mondo Motors/124MondoMotorsMaseratiGranTurismo.html","Maserati Gran Turismo","","Mondo Motors / 1:24");
// Motorama
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Motorama/124MotoramaCitroenC4WRC.html","Citroen C4 WRC","","Motorama / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Motorama/124MotoramaFiatGrandePuntoAbarthS2000.html","Fiat Grande Punto S2000","","Motorama / 1:24");
c++; item[c]=new Array("","http://xoomer.alice.it/diecast124models/124Motorama/124MotoramaPeugeot207Super2000.html","Peugeot 207 Super 2000","","Motorama / 1:24");
page="<html><head><title> Search Result </title></head><body background=images/Sfondo.gif> </body><center><table border=1 cellspacing=1 width=80%>";
function search(frm)
{win = window.open("","","width=500,height=300 scrollbars=1 toolbar=0 menubar=0");
win.document.write(page);
txt = frm.srchval.value.toLowerCase().split(" ");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++)
{fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)for (k = 0; k < txt.length; k++)if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++)
{
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w] = 0;
}
win.document.write("</table>
Search Result: "+total+"
</body></html>");
win.document.close();
}
function show(which,wind,num)
{
link = item[which][1] + item[which][0];
line = "<tr><td>"+item[which][2]+""+"
";
line += item[which][4] + "</td></tr>"
wind.document.write(line);
return 1;
}
</SCRIPT>
</head>
<body>
<form method=get action="javascript:void(0)" onsubmit="search(this); return false;">
<input type=text name=srchval value="">
<input type=submit value=" Search">
</form>
</body>
</html>
<tr>
<td width="51%" align="center">
</td>
</tr>
</table>
</center>
</div>
</p>
</div>
</center>
<div align="center">
<center>
<hr>
</p>
</BODY></HTML>