[thelist] opposite of checked="checked"

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Tue Jun 21 14:24:29 CDT 2005


	Checked is a boolean property; it is either true or false.  In
Javascript (or in HTML), if you set checked="anything", it is true.  To
*not* have the button/box checked, you just don't add the checked
attribute at all.

	Of course this is a problem if you want things to be unchecked
when user clicks Back.  The whole form can be reset with the proper
caching headers, but that wouldn't serve your purpose here.

	Basically, you're going to need client scripting to pull this



-----Original Message-----
From: thelist-bounces at lists.evolt.org On Behalf Of Brian Cummiskey

I have a form with a bunch of radio buttons among other form elements, 
where, on page load, i want to basically re-set all the radio buttons to


I know, this sounds counter productive...  but bear with me.

Basically, i want the default value of everything to be <input 
tyep="radio" checked="NOTCHECKED" />.

Obviously, that doesn't exist.  I need to fight cookies or browser 
sessions as well.  If the user hits the back button, i want it empty

The hard part--  I'm trying to avoid using scripting.  this is going to 
be served on a HIGHLY limited 3rd party, one-off application, but it 
supports xml, html and css.  browser sessions are similar to IE.

I don't want to physcally force a reset of the entire form, as i don't 
want to clear text boxes-- just radio elements.

can this be done?  Any ideas?

More information about the thelist mailing list