Solved

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

Posted on 2003-11-14
6
2,150 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
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

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

635 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