Prof. Guido Russo - Scope - Università degli Studi di Napoli Federico II
Prof. Guido Russo - Scope - Università degli Studi di Napoli Federico II
Prof. Guido Russo - Scope - Università degli Studi di Napoli Federico II
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
document.form1.listtextDevice.options[i].value){<br />
insert = false;<br />
break;<br />
}<br />
if(insert)<br />
document.form1.listtextSelection.options[document.form1.listtextSelection.optio<br />
ns.length]=new Option(document.form1.listtextDevice.options[i].value,<br />
document.form1.listtextDevice.options[i].value);<br />
else<br />
alert("The device '" + document.form1.listtextSelection.options[k].value + "'<br />
is already selected");<br />
}<br />
}<br />
//alert(document.form1.listtextDevice.options[0].selected);<br />
}<br />
/*<br />
Rimuove il <strong>di</strong>spositivo selezionato dalla lista delle <strong>di</strong>pendenze assegnate<br />
*/<br />
function removeSelected(){<br />
var myArr = new Array();<br />
for(i = 0, j = 0; i < document.form1.listtextSelection.options.length; i++){<br />
if(!document.form1.listtextSelection.options[i].selected){<br />
myArr.push(document.form1.listtextSelection.options[i]);<br />
}<br />
}<br />
document.form1.listtextSelection.options.length = 0;<br />
}<br />
for(i = 0, j = 0; i < myArr.length; i++){<br />
document.form1.listtextSelection.options[i]=myArr[i];<br />
}<br />
function selectAll(obj){<br />
for(i = 0; i < obj.options.length; i++)<br />
obj.options[i].selected = true;<br />
}<br />
function onLoad(){<br />
document.form1.listtextSelection.options.length=0;<br />
for( i = 0; i < arrSelected.length; i++)<br />
document.form1.listtextSelection.options[i] = new Option(arrSelected[i],<br />
arrSelected[i]);<br />
}<br />
/*<br />
Viene attivata ogni qualvolta si cambia il tipo della farm, se il tipo selezionato è new si<br />
abilita un campo <strong>di</strong> testo per inserire il nome della nuova farm<br />
*/<br />
function farmSelection_onChange(){<br />
var val =<br />
document.form1.farmSelection.options[document.form1.farmSelection.selectedIndex].value;<br />
if(val=="NEW"){<br />
document.form1.farmText.setAttribute("value","");<br />
document.form1.farmText.removeAttribute("<strong>di</strong>sabled");<br />
}<br />
else if(val=="NONE"){<br />
document.form1.farmText.setAttribute("value","");<br />
document.form1.farmText.setAttribute("<strong>di</strong>sabled","<strong>di</strong>sabled");<br />
}<br />
else{<br />
document.form1.farmText.setAttribute("value",document.form1.farmSelection.options[doc<br />
ument.form1.farmSelection.selectedIndex].value);<br />
Pietro Neroni 566/2833 Pagina 107 <strong>di</strong> 117