Is it possible for the line color to change after the user selects a radio from the list, taking into account that I am submitting the page? the problem is that I am not able to do it as you can see below my Table pulls the database data dynamically
ListingAgenda
this is the Table
<table width="199" border="1" class="table table-condensed" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<thead class="style4">
<tr bgcolor="${cortop}" >
<th width="21" align="left" > </th>
<th width="178" align="left" ><strong>EXAMES / PROCEDIMENTOS</strong></th>
</tr>
<c:forEach var="item" items="${listarAgenda}">
<tr bgcolor="#F4F4F4">
<th align="left" nowrap="nowrap"><input type="radio" name="radio4" id="radio4" value="radio4" onclick="JavaScript:selecionarAgenda(${item.idAgenda},'${item.agenda}',${item.idLocalAtend},'${item.local}', 0, '');" /></th>
<th align="left" nowrap="nowrap"><a href="#" onclick="JavaScript:selecionarAgenda(${item.idAgenda},'${item.agenda}',${item.idLocalAtend},'${item.local}', 0, '');">${item.agenda}</a></th>
</tr>
</c:forEach>
</thead>
</table>
JavaScript: SelectAgenda
function selecionarAgenda(idAgenda, nomeAgenda, idlocal, local, idmedico, medico){
document.forms[0].sc.value=document.getElementById("div1").scrollTop-2;
diaSemana();
if(idAgenda > 0){
document.formConsulta.selectMedico.value=0;
document.formConsulta.medico.value='';
document.formConsulta.idagenda.value=idAgenda;
document.formConsulta.nomeagenda.value=nomeAgenda;
document.formConsulta.selectLocal.value=idlocal;
document.formConsulta.local.value=local;
document.formConsulta.idtipoconsulta.value=4;
document.formConsulta.idmedico.value=0;
document.formConsulta.action='<%=request.getContextPath()%>/controlador?acao=agendaunica';
document.formConsulta.submit();
}else{
document.formConsulta.nomeagenda.value='';
document.formConsulta.idagenda.value=0;
document.formConsulta.idtipoconsulta.value=0;
document.formConsulta.idmedico.value=idmedico;
document.formConsulta.medico.value=medico;
MM_jumpMenu();
}
}
My Jsp
communicates with servlet
controller? action = agendaunica thus doing the submit of the page after selecting radio
. I would like to change the color of the selected radio after the submit because the user complains that he does not remember which Agenda he is in.