<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Radio buttons could be defeated</title>
	<atom:link href="http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/</link>
	<description></description>
	<pubDate>Wed, 19 Nov 2008 22:27:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: maziar</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-14394</link>
		<dc:creator>maziar</dc:creator>
		<pubDate>Wed, 15 Oct 2008 00:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-14394</guid>
		<description>tanx sergey , u r excellent!</description>
		<content:encoded><![CDATA[<p>tanx sergey , u r excellent!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swetha</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11558</link>
		<dc:creator>Swetha</dc:creator>
		<pubDate>Thu, 26 Jun 2008 11:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11558</guid>
		<description>My doubt is cleared now. Thank you so much.</description>
		<content:encoded><![CDATA[<p>My doubt is cleared now. Thank you so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Smirnov</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11557</link>
		<dc:creator>Sergey Smirnov</dc:creator>
		<pubDate>Thu, 26 Jun 2008 11:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11557</guid>
		<description>Underscore is not required, "this.chk" would have worked too.</description>
		<content:encoded><![CDATA[<p>Underscore is not required, &#8220;this.chk&#8221; would have worked too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swetha</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11556</link>
		<dc:creator>Swetha</dc:creator>
		<pubDate>Thu, 26 Jun 2008 11:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11556</guid>
		<description>OK. So you mean that we can create our own properties using __(underscoreunderscore)</description>
		<content:encoded><![CDATA[<p>OK. So you mean that we can create our own properties using __(underscoreunderscore)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Smirnov</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11555</link>
		<dc:creator>Sergey Smirnov</dc:creator>
		<pubDate>Thu, 26 Jun 2008 10:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11555</guid>
		<description>Swetha,

I create this property myself and assign a value of a standard "checked" to it, like this:

this.__chk = this.checked</description>
		<content:encoded><![CDATA[<p>Swetha,</p>
<p>I create this property myself and assign a value of a standard &#8220;checked&#8221; to it, like this:</p>
<p>this.__chk = this.checked</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swetha</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11554</link>
		<dc:creator>Swetha</dc:creator>
		<pubDate>Thu, 26 Jun 2008 10:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11554</guid>
		<description>Thanks for the clarification. But i still have a confusion. How come "__chk" acts as a property in "this" object and stores the current state? I have explored through google and i have'nt found such a property in javascript. Can you please explain me in detail if you dont mind?

Thanks,
Swetha.</description>
		<content:encoded><![CDATA[<p>Thanks for the clarification. But i still have a confusion. How come &#8220;__chk&#8221; acts as a property in &#8220;this&#8221; object and stores the current state? I have explored through google and i have&#8217;nt found such a property in javascript. Can you please explain me in detail if you dont mind?</p>
<p>Thanks,<br />
Swetha.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladislav Nevmerzhitsky</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11521</link>
		<dc:creator>Vladislav Nevmerzhitsky</dc:creator>
		<pubDate>Mon, 23 Jun 2008 10:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11521</guid>
		<description>Спасибо, все работает просто замечательно! 8)</description>
		<content:encoded><![CDATA[<p>Спасибо, все работает просто замечательно! 8)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Smirnov</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11448</link>
		<dc:creator>Sergey Smirnov</dc:creator>
		<pubDate>Mon, 16 Jun 2008 09:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11448</guid>
		<description>Swetha,

"__chk" is just a property name in "this" object. It stores the current state of the radio button and I have come up with a name myself, you can give it any other name you want, basically.</description>
		<content:encoded><![CDATA[<p>Swetha,</p>
<p>&#8220;__chk&#8221; is just a property name in &#8220;this&#8221; object. It stores the current state of the radio button and I have come up with a name myself, you can give it any other name you want, basically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swetha</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11446</link>
		<dc:creator>Swetha</dc:creator>
		<pubDate>Fri, 13 Jun 2008 07:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11446</guid>
		<description>Can you please tel me what "__chk" means in "this.__chk"?</description>
		<content:encoded><![CDATA[<p>Can you please tel me what &#8220;__chk&#8221; means in &#8220;this.__chk&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidar Ok</title>
		<link>http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11436</link>
		<dc:creator>Sidar Ok</dc:creator>
		<pubDate>Mon, 19 May 2008 14:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuffedguys.com/2005/12/19/radio-buttons-could-be-defeated/#comment-11436</guid>
		<description>Hi there, I couldn't get this working (this.__chk was undefined) but I employed another approach that works for me without needing to handle mousedown event: 

This is the definition of the radiobutton:



Where the ToggleRadioButton has the follwowing implementation:

var lastSelected;

function ToggleRadioButton(rb)
{
    if(!lastSelected &#124;&#124; lastSelected != rb)
    {
      rb.checked = true;
      lastSelected = rb;
    }
    else
    {
      rb.checked = false;
      lastSelected = null;
    }
}

You may want to amend this if you are trying to have it more than 1 set of radio buttons, but it should be an easy anyway. 

Thanks for the great post,

Sidar</description>
		<content:encoded><![CDATA[<p>Hi there, I couldn&#8217;t get this working (this.__chk was undefined) but I employed another approach that works for me without needing to handle mousedown event: </p>
<p>This is the definition of the radiobutton:</p>
<p>Where the ToggleRadioButton has the follwowing implementation:</p>
<p>var lastSelected;</p>
<p>function ToggleRadioButton(rb)<br />
{<br />
    if(!lastSelected || lastSelected != rb)<br />
    {<br />
      rb.checked = true;<br />
      lastSelected = rb;<br />
    }<br />
    else<br />
    {<br />
      rb.checked = false;<br />
      lastSelected = null;<br />
    }<br />
}</p>
<p>You may want to amend this if you are trying to have it more than 1 set of radio buttons, but it should be an easy anyway. </p>
<p>Thanks for the great post,</p>
<p>Sidar</p>
]]></content:encoded>
	</item>
</channel>
</rss>
