PDA

View Full Version : Default OnClick for Radio Buttons Not Cancelling



Torin Mai
06-03-2009, 03:03 AM
I'm trying to create a game using Javascript, specifically that one game where you are trying to turn on all the buttons but every button you click also toggles the buttons around it in a '+' shape (everyone has played it, I just never found out what it was called). I'm trying to do it using radio buttons, and the simplest way involves disabling the natural action of the radio button to be activated, is this something that can be deactivated?

I've tried every variation of "cancel default event" I could think of and find on the internet with no success. Is this just outside the normal event scope or what?

Nile
06-04-2009, 02:36 AM
What do you mean the natural action of a radio button? Can you explain that please? If you were doing a game like this, I would use a table or divs and instead of the radio being checked, it can be filled in with light blue. But please answer my first question before any further assistance. Thanks!

Torin Mai
06-04-2009, 03:26 AM
I mean that the default action of a radio button is to go from unchecked to checked. You click an unchecked radio button and becomes checked.

Also I realize that in someways using a div would be easier, but if not for this trouble with the radio buttons I'm having I'd have long been done with this and more quickly than with the divs (which would req toying with css and what not).