Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
mis botones de radio permanecen marcados incluso cuando se selecciona otro

Trabajando Colfusion/javascript: tengo un conjunto de botones de radio creados por este ciclo.

 <cfloop from = '1' to = '#qxrefcnt#' index = 'k'> <cfset selval = valls[k]> <input type = 'radio' class = 'moxradio round' style = 'width:15px; height:15px; font-size:12px; position:absolute; z-index:2" name = 'selchoice' id = 'top_k' onclick = "topsplit('#k#','#selval#')"> <a style = 'padding-left: 50px'> #displs[k]#</a><br> </cfloop>

Esta lista se despliega cuando se hace clic en un botón:

 function toggscr(id){ var thelist = document.getElementById(id); if(thelist.style.display == 'none'){ thelist.style.display = ''; } else if(thelist.style.display != 'none'){ thelist.style.display = 'none';} }//end toggscr

Cuando selecciono un elemento de la lista de radio, mi programa hace lo correcto con él y, como es normal, deja ese botón marcado.

 function topsplit(k,valls) { var val = valls.split("~"); for (j = 0; j< val.length; j++) { m = j+1; colid = 'x_'+ m; var x = document.getElementById(colid); //enter value into form document.getElementById(colid).value = val[j]; }//for document.getElementById('sel').style.display = 'none'; //the lines below do not uncheck anything var radid = 'top_' + k; document.getElementById(radid).checked = 'false'; }//endfunction topsplit

Si luego reviso otro botón, el programa vuelve a hacer lo correcto, pero el botón original también permanece marcado (y no volverá a funcionar si se hace clic en él).

Aquí hay una imagen de la lista de radio marcada de forma múltiple: ingrese la descripción de la imagen aquí

No puedo darme cuenta de que está mal aquí. Todos mis otros botones de opción funcionan correctamente. Si alguien tiene una idea de cuál es el problema, me encantaría escucharlo.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!