Ciao lista,
il titolo non è proprio adatto ma non sapevo come descriverlo.
Dovrei creare una paginetta con un campo text per ricercare dei nominativi.
Avevo trovato un js su jsdir che in base alle lettere inserite scorreva un campo select.Allego codice
codice:
<HTML>
<HEAD>
<TITLE>Selezione da una lista digitando i caratteri in un TextBox</TITLE>
<HEAD>
<SCRIPT>
<!--
function Cerca()
{
with (document.modulo)
{
ThisFind=-1;
StringToSearch=input.value;
StringToSearchLength=StringToSearch.length;
if (StringToSearchLength>0)
for (i=0;i<stati.options.length;i++)
ThisFind==-1&&stati.options[i].text.toLowerCase().substring(0,StringToSearchLength)==StringToSearch?ThisFind=i:null;
else
ThisFind=0;
stati.selectedIndex=ThisFind;
}
}
//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff">
<FORM NAME="modulo">
<INPUT TYPE="text" NAME="input" VALUE="Scrivi..." CLASS="" onKeyUp="this.value=this.value.toLowerCase();Cerca()" onFocus="this.select()">
<SELECT NAME="stati" size="5">
<OPTION>Albania</OPTION>
<OPTION>Cayman Islands</OPTION>
<OPTION>Central African Rep.</OPTION>
<OPTION>Chad</OPTION>
<OPTION>Chile</OPTION>
<OPTION>China</OPTION>
<OPTION>Christmas Island</OPTION>
<OPTION>Gambia</OPTION>
<OPTION>Georgia</OPTION>
<OPTION>Germany</OPTION>
<OPTION>Ghana</OPTION>
<OPTION>Gibraltar</OPTION>
<OPTION>Great Britain (UK)</OPTION>
<OPTION>Greece</OPTION>
<OPTION>Greenland</OPTION>
<OPTION>Grenada</OPTION>
<OPTION>Guadeloupe (Fr.)</OPTION>
<OPTION>Guam (US)</OPTION>
<OPTION>Guatemala</OPTION>
<OPTION>Guinea</OPTION>
<OPTION>Guinea Bissau</OPTION>
<OPTION>Guyana</OPTION>
<OPTION>Italy</OPTION>
<OPTION>Ivory Coast</OPTION>
</SELECT>
</FORM>
</BODY>
</HTML>
E' possibile creare una cosa simile ma non con le select?Quindi scrivo nel campo testo e mano mano scorre i campi nella table.
Spero di essermi spiegato
Grazie David