> function
> editar_etapa_projeto(etapa_projeto_id,etapa_id,dias_total,data_inicial){
> $('#etapa_projeto_id').val(etapa_projeto_id);
> $('#etapa_id').find('option[value='+etapa_id+']').attr('selected',true');
> $('#dias_total').val(dias_total);
> $('#data_inicial').val(data_inicial); }
I want with this Javascript function, it fills the inputs of ids # such with the values received by input variables in the function.
It is working for the inputs, it takes the value of the variable, and plays in the value of the input.
But no select,
I need it to check the value that is received in the variable step_id, go to the id select #etapa_id, and a select in the select option where that value is.
$('#etapa_id').find('option[value='+etapa_id+']').attr('selected’,'true');
I have found that it selects yes, but by mistake in the selected="selected" compatibility firefox, it will not.