Ultimate Web Site Drop Down Menu Forum

Ultimate Web Site Drop Down Menu Forum (http://www.udm4.com/forum/index.php)
-   CSS and HTML (http://www.udm4.com/forum/forumdisplay.php?f=8)
-   -   Unselecting one Radio button (http://www.udm4.com/forum/showthread.php?t=970)

ISMAILC 02-27-2008 02:47 PM

Unselecting one Radio button
Hi, I need help!

I Would like to know of one can unselect a radio button.

i know one can unselect a radio button by selecting another radio button.

but what happens when there is only one, is there a way i can select & unselect the radio button?

Any ideas,


vinyl-junkie 02-28-2008 01:16 PM

Here's a javascript example that I found:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title&gtDeselect A Radio Button</title>
<script language="JavaScript" type="text/JavaScript">
function uncheckRadio() {
 var choice = document.form1.RadioGroup1;
 for (i = 0; i < choice.length; i++) {
  if ( choice[i].checked = true )
  choice[i].checked = false;

<form name="form1" method="post" action="">
        <input type="radio" name="RadioGroup1
" value="1" ondblclick="uncheckRadio();">
        <input type="radio" name="RadioGroup1"
value="2" ondblclick="uncheckRadio();">
        <input type="radio" name="RadioGroup1"
value="3" ondblclick="uncheckRadio();">

ISMAILC 02-28-2008 01:22 PM

Great!!! Thank You VERY MUCH

I am going to add it to my xslt file & start checking it.

Thank You.

All times are GMT. The time now is 02:05 PM.

Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.