codice:
<form name="Autenticazione" method="post" action="Autenticazione.asp" tmt:validate="true">
<input name="specialmeal" type="checkbox" class="boxes" id="specialmeal" value="true" />
<input type="text" name="newmeal" id="newmeal" tmt:required="dependonbox" tmt:message="Please enter the special meal's name" />
<input type="submit" value="Submit" />
</form>

<script type="text/javascript">
// <![CDATA[
// A custom validation method
function dependonmoving(fieldNode){
	var relatedBox = document.getElementById("idDellaSelect");
	// The field is required only if the box is checked
	var isRequired = relatedBox.value;
	if(isRequired=='ITALIA' && fieldNode.value == ""){
		return false;
	}
	return true;
}
// ]]>
</script>