Radiobutton inside Popover is not checked via javascript

0

I have a query screen where I feed an html table with the database records. In one of the columns, of each line, there are some options like edit, delete, add photos and another option that opens Popover.

This Popover is from Bootstrap 3, when I open the popover of some line it shows 3 radiobuttons and in their onclick it runs a script in the bank without updating the page. I want the selected radio to be checked without having to refresh the page, but I can not.

Followthecode:

<tdclass="col-small center">
<div class="action-buttons">                                    
<a class="popover-dw" href="#" data-popover="true">
  <i class="fa fa-cog bigger-130" data-toggle="tooltip"></i>
</a>
<div class="popover-content" style="display:none">
  <form class="marcarComoVendidoAlugado">
    <div>
      <p>
        Anúncio: <%=rsAnuncios("id")%>
      </p>
      <p>
        <input <%=checkNone%> type="radio" name="vendidoAlugado" id="none<%=rsAnuncios("id")%>" onclick="alugadoVendido('src/rotinas/rotinas.asp?acao=Vendido&id=<%=rsAnuncios("id")%>&tipo=none&idInput=none<%=rsAnuncios("id")%>', 'none<%=rsAnuncios("id")%>');" /> NENHUM
      </p>
      <p>
        <input <%=checkVendido%> type="radio" name="vendidoAlugado" id="marcarComoVendido<%=rsAnuncios("id")%>" onclick="alugadoVendido('src/rotinas/rotinas.asp?acao=Vendido&id=<%=rsAnuncios("id")%>&tipo=vendido&idInput=marcarComoVendido<%=rsAnuncios("id")%>', 'marcarComoVendido<%=rsAnuncios("id")%>');" /> Marcar anúncio como VENDIDO
      </p>
      <p>
        <input <%=checkAlugado%> type="radio" name="vendidoAlugado" id="marcarComoAlugado<%=rsAnuncios("id")%>" onclick="alugadoVendido('src/rotinas/rotinas.asp?acao=Vendido&id=<%=rsAnuncios("id")%>&tipo=alugado&idInput=marcarComoAlugado<%=rsAnuncios("id")%>', 'marcarComoAlugado<%=rsAnuncios("id")%>');" /> Marcar anúncio como ALUGADO
      </p>
    </div>
  </form>
</div>  
</div>
</td>

And here's the javascript:

function alugadoVendido(url, obj1){
    //$(".marcarComoVendidoAlugado").attr("checked", false);
    $(".marcarComoVendidoAlugado").prop("checked", false);
    $("#"+obj1).prop("checked", true);
    window.rotinas.location.href = url;
}
    
asked by anonymous 14.04.2015 / 19:20

0 answers