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,

Regards

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

Here's a javascript example that I found:

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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;
 }
}
//-->
</script>
</head>

<body>
<form name="form1" method="post" action="">
      <p>
        <label>
        <input type="radio" name="RadioGroup1
" value="1" ondblclick="uncheckRadio();">
    Apple</label>
        <br>
        <label>
        <input type="radio" name="RadioGroup1"
value="2" ondblclick="uncheckRadio();">
    Orange</label>
        <br>
        <label>
        <input type="radio" name="RadioGroup1"
value="3" ondblclick="uncheckRadio();">
    Grape</label>
        </p>
    </form>
</body>
</html>


ISMAILC 02-28-2008 01:22 PM

Great!!! Thank You VERY MUCH
 
Great!

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

Thank You.


All times are GMT. The time now is 09:14 PM.

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