kreen080682
Messages postés2Date d'inscriptionmardi 15 mars 2005StatutMembreDernière intervention15 mars 2005
-
15 mars 2005 à 15:01
PhiL666
Messages postés102Date d'inscriptionmardi 15 mars 2005StatutMembreDernière intervention 9 juin 2006
-
16 mars 2005 à 01:36
PhiL666
Messages postés102Date d'inscriptionmardi 15 mars 2005StatutMembreDernière intervention 9 juin 2006 16 mars 2005 à 01:36
voici un ancien script que j'avais fait ... changer le size des <SELECT> pour les mettres déroulants.
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT language="Javascript" type="Text/Javascript">
<!--
var combobox1 = new Array()
combobox1[0] = new Option("Sections");
combobox1[1] = new Option("1. Programmation");
combobox1[2] = new Option("2. Design");
var combobox2 = new Array()
combobox2[0] = new Array()
combobox2[0][0] = null;
combobox2[1] = new Array()
combobox2[1][0] = new Option("1. Notepad ++");
combobox2[1][1] = new Option("2. EasyPHP");
combobox2[1][2] = new Option("3. Mozilla (JS console)");
combobox2[2] = new Array()
combobox2[2][0] = new Option("1. Photoshop");
combobox2[2][1] = new Option("2. Image Ready");
combobox2[2][2] = new Option("3. Flash");
function initialiser()
{
for (x=0;x<combobox1.length;x++)
{
document.form.cmbThemes.options[x] = new Option(combobox1[x].text);
}
for (y=0;y<combobox2[0].length;y++)
{
if (combobox2[0][y] != null)
{
document.form.cmbSousThemes.options[y] = new Option(combobox2[0][y].text);
}
else
{
document.form.cmbSousThemes.options[y] = null;
}
}
}
function changement()
{
for (x=0;x<document.form.cmbSousThemes.options.length;x++)
{
document.form.cmbSousThemes.options[x] = null;
}
var index = parseInt(document.form.cmbThemes.selectedIndex);
for (y=0;y<combobox2[index].length;y++)
{
if (combobox2[index][y] != null)
{
document.form.cmbSousThemes.options[y] = new Option(combobox2[index][y].text);
}
else
{
document.form.cmbSousThemes.options[y] = null;
}
}
}