Prima che qualcuno impazzisca per risolvere il mio problema, gli segnalo che sono appena riuscita a trovare qualcosa che facesse al caso mio.
Non mi intendo di script quindi immagino che ciò che ho reperito sia eccessivamente dispersivo e sovradimensionato (un po come uccidere una mosca con un cannone)
Comunque, a vantaggio dei curiosi, riporto il codice in questione:
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento senza titolo</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<!--
//Double Combo Box with Description Code- by Randall Wald (http://www.rwald.com)
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
var num_of_cats = 2; // This is the number of categories, including the first, blank, category.
var open_in_newwindow=1; //Set 1 to open links in new window, 0 for no.
var option_array = new Array(num_of_cats);
option_array[0] = new Array(
"Attive",
"Terminate",
"Annullate");
option_array[1] = new Array(
"In corso",
"Acquisite",
"Non acquisite");
function switch_select()
{
for (loop = window.document.form_1.select_2.options.length-1; loop > 0; loop--)
{
window.document.form_1.select_2.options[loop] = null;
}
for (loop = 0; loop < option_array[window.document.form_1.select_1.selectedIndex].length; loop++)
{
window.document.form_1.select_2.options[loop] = new Option(option_array[window.document.form_1.select_1.selectedIndex][loop]);
}
window.document.form_1.select_2.selectedIndex = 0;
}
function switch_text()
{
window.document.form_1.textarea_1.value = text_array[window.document.form_1.select_1.selectedIndex][window.document.form_1.select_2.selectedIndex];
}
function box()
{
if (window.document.form_1.select_2.selectedIndex == 0)
{
alert("Dove vuoi andare?");
} else {
if (open_in_newwindow==1)
window.open(url_array[window.document.form_1.select_1.selectedIndex][window.document.form_1.select_2.selectedIndex],"_blank");
else
window.location=url_array[window.document.form_1.select_1.selectedIndex][window.document.form_1.select_2.selectedIndex]
}
}
function set_orig()
{
window.document.form_1.select_1.selectedIndex = 0;
window.document.form_1.select_2.selectedIndex = 0;
}
window.onload=set_orig
// -->
</script>
<form name="form_1" >
<select name="select_1" onchange="switch_select(); switch_text();">
<option>Situazione Iniziative</option>
<option>Situazione Offerte</option>
</select> <select name="select_2" onchange="switch_text();">
<option>Attive</option>
<option>Terminate</option>
<option>Non presentate</option>
</select>
<input type="submit" name="Submit" value="Invia">
</form>
</body>
</html>
Un saluto,
AleX