grazie per la disponibilità.
per le condizioni 1 e 2 è tutto OK, ma per queste non riesco a far funzionare lo script:
3) Se il valore selezionato nella select name="c_fu" è NULLO ( "" ) oppure è "SI" dovrei disabilitare la icon_2.gif
4) Se il valore selezionato nella select name="c_fu" è "NO" dovrei abilitare la icon_2.gif
codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script type="text/javascript">
function CheckIcon1(ss){
var ok=false
if(ss.options[ss.selectedIndex].value==''){
document.getElementById('icon1').onclick=Function('return false')
document.getElementById('img_icon1').src='/mac/images/elimina_icon.gif'
}
else{
document.getElementById('icon1').onclick=Function('return true')
document.getElementById('img_icon1').src='/mac/images/modifica_icon.gif'
ok=true
}
return ok
}
function Form(theUrl, percSize)
{
var width = 400;
var height = 200;
var left = Math.floor((screen.width-width)/2);
var top = Math.floor((screen.height-height)/2);
window.open(theUrl,'popup','width='+width+',height='+height+',top='+top+',left='+left);
}
</script>
</head>
<body>
<form action="form.asp" method="post" onsubmit="return(validateForm(this));">
<select size="1" name="t_im" onchange="if(CheckIcon1(this))Form('test.htm', '');">
<option value="">Select value</option>
<option value="A">A</option>
<option value="C">C</option>
<option value="Ca">Ca</option>
<option value="Cav">Cav</option>
</select>
<input type="text" name="e_gu" size="10" readonly>
<a id="icon1" href="javascript:Form('test.htm')" onclick="return false">
[img]elimina_icon.gif[/img]</a>
<select size="1" name="c_fu" onchange="CheckIcon1(this);">
<option value="">Select value</option>
<option value="SI">SI</option>
<option value="NO">NO</option>
</select>
<input type="text" name="c_ma" size="10" readonly>
<a id="icon1" href="javascript:Form('test.htm')" onclick="return false">
[img]elimina_icon.gif[/img]</a>
</form>
</body>
</html>