Ciao!
Eccolo qui
Stavo appunto cercando si sistemarlo XD

Se lo provo mi da un errore con impossibile visualizzare la pagina web, e nella barra dell'url java-script:void(0)?srchval=html

dove html era una cosa a caso che ho provato a cercare


PAGINA RESULTS:

codice:
<html> 
  <head> 
     <title>Script su scripting di WebLinkSearch Results</title>
  </head>

  <body bgcolor='white'> 
     <table id="mytable" cellspacing="10" width="80%"> </table> 
  </body> 
</html>

PAGINA HOME:

codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript">

var item = new Array();

c=0; item[c]=new Array("index.html","","Web-Link","index,main,start,home",
"Dimostrazione motore di ricerca interno al tuo sito.");

c++; item[c]=new Array("1.html","","primi passi","","Corso html ");
c++; item[c]=new Array("2.html","","primi passi","","Corso2 html ");
c++; item[c]=new Array("3.html","","primi passi","","Corso3 html ");
c++; item[c]=new Array("4.html","","primi passi","","Corso4 html ");

function search(frm) {


win = window.open("results.html","","scrollbars");
mytable = win.document.getElementById("mytable"); 
mytable.innerHTML = "<tr><td>ciao</td></tr>";



txt = frm.srchval.value.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;
}

}
function show(which,wind,num) {
link = item[which][1] + item[which][0]; 
line = "<tr><td>"+item[which][2]+" Punti: "+num+"
";
line += item[which][4] + "
"+link+"<\/td><\/tr>";
wind.document.write(line);
return 1;
}

</script>
</head>

<body>
<form method=get action="java-script:void(0)" onsubmit="search(this); return false;">
<input type=text name=srchval value="">
<input type=submit value="Cerca"> </form>
</body>
</html>