Solved

Stupid HTML question:  possible for user to uncheck radio button?

Posted on 2003-11-14
6
2,148 Views
Last Modified: 2008-03-03
Chalk this one up as a true brain-fart moment...but as they say in "Dirty Harry," I needs to know.... :)

Is it possible for a user to uncheck a radio button once it's been checked, without using JavaScript?  I could have sworn I was able to do this by using a couple keys on my keyboard, but I'm either remembering incorrectly or can't get the combination of keys/mouseclicks to work.  

I mocked up a page with a couple radio buttons and, sure enough, I can't seem to do it.  I tried the space bar; holding the shift key and then clicking it; hitting the delete key....nothing.  

If this is possible, please share the keyboard combination.  Thanks!
0
Comment
Question by:cacklebunny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 9749135
perhaps by resetting the form ... or by reloading the page.

Add a reset button to the form:

<INPUT type="reset" name="btnReset" value="Reset" />
0
 
LVL 5

Accepted Solution

by:
M256 earned 50 total points
ID: 9749150
Once it is checked on the page, it is not supposed to be possible to uncheck it except by checking another in the series.

However, if you are worried about a hacker doing something, it is possible.  Anybody can copy the html page to their computer, unselect the default (if you have one), change the action page of the form to your remote page, and submit it.

Matthew
0
 
LVL 2

Author Comment

by:cacklebunny
ID: 9749396
M256:  No security concerns, this is just simple curiosity.   I seem to have recalled there was a way for the end-user to do it if they knew the right combination of keystrokes/mouseclicks.  I thought it was the spacebar but all that does is toggle the radio button from one choice to the other.  

I know the "reset" button will do it provided the designer actually places a reset button in the form.  I also know you can do it with JavaScript --but again, only if the designer provides this. For the sake of argument, assume that the form has neither a reset button nor a link that causes a JavaScript function to fire.

Thanks.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 5

Expert Comment

by:M256
ID: 9751434
I cannot say absolutely, but I don't think it is possible with Internet Explorer.

Maybe a non-standard browser?

I found several places where people were trying to deselect radio buttons, but they were using JavaScript.
Example:
http://www-10.lotus.com/ldd/46dom.nsf/0/4c663084da65131685256d630072af1f?OpenDocument

Matthew
0
 
LVL 3

Expert Comment

by:superslamwich
ID: 9751652
Here's a bookmarklet that will do it regardless of whether the designer provides a reset button:

javascript:for(i=0;i<document.forms.length;i++){document.forms[i].reset()}

{Slam}
0
 
LVL 2

Author Comment

by:cacklebunny
ID: 9763958
M256:  

Are you saying IE is a standard browser? ;)

I think you're right in that it must be impossible without a reset button or JavaScript.  So unless someone posts otherwise soon, I'll be passing out the points to you.... "not possible" appears to be the right answer.

As far as other browsers, I've tried to uncheck it using Mozilla and also Netscape 7 and no luck.
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question