I'm new to JavaScript and I needed to know what code I can use for this situation:
For example, I have a column called "Product" which is of the type choice and I wanted to select an option from that column for example "chocolate" automatically in the other column named "type" would be placed the product type in this case "sweets" .
<script type = "text/javascript">
document.getElementById('id').style.display = 'none';
function NovaFuncaoDespesas()
{
var Despesas = document.getElementById('id') ;
var Rubrica = document.getElementById('Rubrica');
var rubrica=Rubrica.options[Rubrica.selectedIndex].text;
if(rubrica=="Ativos Tangíveis Específicos")
{
Despesas.options[1].disabled=true;
}
if(rubrica!="Ativos Tangíveis Específicos")
}
</script>