[thelist] opposite of checked="checked"

Brian Cummiskey Brian at hondaswap.com
Tue Jun 21 14:42:44 CDT 2005


VOLKAN ÖZÇELİK wrote:
> A trick can be a hidden radio button (position:absolute;top:-999em;
> left:-999em; display:none) and setting it checked when you need all
> the rest to be not check.
> 
> Obviously screen-readers will not like this. But if I understood
> correctly accessibility is not a big deal in your case.
> 


Hrm, might be getting somewhere with this.  I'm not concered with screen 
readers or even standards for that matter--  this is an internal app for 
about 5 people, all who can see/hear :)


So now, if i have this hidden radio button that is marked to be checked 
by default: <input type="radio" class="offscreenposition" 
checked="checked" name="A" value="foo" />

and its visual counter part,
<input type="radio" name="A" value="bar" />


If I select radio button "bar", submit the page, and then hit the back 
button, "bar" is still active, not the off-screen "foo".

And this puts me right back where I started from...

Appreciate the idea though.  might be a part of the answer.



More information about the thelist mailing list