<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>westworld: a webmasters best friend &#187; checkbox</title>
	<atom:link href="http://www.westworld.be/tag/checkbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.westworld.be</link>
	<description>A webmasters best friend</description>
	<lastBuildDate>Mon, 14 Jun 2010 18:12:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>unchecked checkbox not in $_POST</title>
		<link>http://www.westworld.be/a-note-to-self/uncheck-checkpost-not-in-_post/</link>
		<comments>http://www.westworld.be/a-note-to-self/uncheck-checkpost-not-in-_post/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 10:34:11 +0000</pubDate>
		<dc:creator>westworld</dc:creator>
				<category><![CDATA[a note to self]]></category>
		<category><![CDATA[$_POST]]></category>
		<category><![CDATA[checkbox]]></category>

		<guid isPermaLink="false">http://www.westworld.be/?p=68</guid>
		<description><![CDATA[Iamcam posted a good hack on his blog. It makes your unchecked checkboxes show up in the $_POST on the server.
It&#8217;s very simple and doesn&#8217;t need javascript.
&#60;input type="hidden" name="box1" value="0" /&#62;
&#60;input type="checkbox" name="box1" value="1" /&#62;
If the checkbox is not checked then the value of the hidden input is submited, else the value of the checkbox.


No [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://iamcam.wordpress.com/2008/01/15/unchecked-checkbox-values/" rel="nofollow">Iamcam</a> posted a good hack on his blog. It makes your unchecked checkboxes show up in the $_POST on the server.<br />
It&#8217;s very simple and doesn&#8217;t need javascript.</p>
<p><code>&lt;input type="hidden" name="box1" value="0" /&gt;<br />
&lt;input type="checkbox" name="box1" value="1" /&gt;</code></p>
<p>If the checkbox is not checked then the value of the hidden input is submited, else the value of the checkbox.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.westworld.be/a-note-to-self/uncheck-checkpost-not-in-_post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Checkboxes in Prototype</title>
		<link>http://www.westworld.be/a-note-to-self/checkboxes-in-prototype/</link>
		<comments>http://www.westworld.be/a-note-to-self/checkboxes-in-prototype/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 12:01:15 +0000</pubDate>
		<dc:creator>westworld</dc:creator>
				<category><![CDATA[a note to self]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[Prototypejs]]></category>

		<guid isPermaLink="false">http://www.westworld.be/?p=4</guid>
		<description><![CDATA[observing:
$(&#8217;mycheckbox&#8217;).observe(&#8217;click&#8217;, function(e){alert(&#8217;checked = &#8216; + this.checked);});
setting throught scripting:
$(&#8217;mycheckbox&#8217;).checked = true;
$(&#8217;mycheckbox&#8217;).setAttribute(&#8217;checked&#8217;, true);
$(&#8217;mycheckbox&#8217;).setValue(&#8221;); // will un-check/null value
$(&#8217;mycheckbox&#8217;).setValue(&#8217;anything&#8217;); // will check/on value
$(&#8217;mycheckbox&#8217;).click(); // will toggle the checkbox


Related posts:Prototype: submit multiple select with ajax call


Related posts:<ol><li><a href='http://www.westworld.be/a-note-to-self/prototype-submit-multiple-select-with-ajax-call/' rel='bookmark' title='Permanent Link: Prototype: submit multiple select with ajax call'>Prototype: submit multiple select with ajax call</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><strong>observing:</strong><br />
$(&#8217;mycheckbox&#8217;).observe(&#8217;click&#8217;, function(e){alert(&#8217;checked = &#8216; + this.checked);});</p>
<p><strong>setting throught scripting:</strong><br />
$(&#8217;mycheckbox&#8217;).checked = true;<br />
$(&#8217;mycheckbox&#8217;).setAttribute(&#8217;checked&#8217;, true);<br />
$(&#8217;mycheckbox&#8217;).setValue(&#8221;); // will un-check/null value<br />
$(&#8217;mycheckbox&#8217;).setValue(&#8217;anything&#8217;); // will check/on value<br />
$(&#8217;mycheckbox&#8217;).click(); // will toggle the checkbox</p>


<p>Related posts:<ol><li><a href='http://www.westworld.be/a-note-to-self/prototype-submit-multiple-select-with-ajax-call/' rel='bookmark' title='Permanent Link: Prototype: submit multiple select with ajax call'>Prototype: submit multiple select with ajax call</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.westworld.be/a-note-to-self/checkboxes-in-prototype/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
