<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[KillerSites.com Web Design Forums - i need to show a form only when a checkbox is ticked]]></title>
		<link>http://www.killersites.com/forums/topic/2265/i-need-to-show-a-form-only-when-a-checkbox-is-ticked/</link>
		<description><![CDATA[The most recent posts in i need to show a form only when a checkbox is ticked.]]></description>
		<lastBuildDate>Fri, 09 Oct 2009 10:43:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: i need to show a form only when a checkbox is ticked]]></title>
			<link>http://www.killersites.com/forums/post/11331/#p11331</link>
			<description><![CDATA[<p>Seemed a bit of overkill to include 55kb javascript lib (jQuery) just to hide/show a layer.</p>]]></description>
			<author><![CDATA[dummy@example.com (BeeDev)]]></author>
			<pubDate>Fri, 09 Oct 2009 10:43:58 +0000</pubDate>
			<guid>http://www.killersites.com/forums/post/11331/#p11331</guid>
		</item>
		<item>
			<title><![CDATA[Re: i need to show a form only when a checkbox is ticked]]></title>
			<link>http://www.killersites.com/forums/post/11275/#p11275</link>
			<description><![CDATA[<p>I posted some of the code you would need to use to do this with jQuery. BeeDev is right though -- this could be simply done with regular javascript.</p>]]></description>
			<author><![CDATA[dummy@example.com (falkencreative)]]></author>
			<pubDate>Wed, 07 Oct 2009 17:01:59 +0000</pubDate>
			<guid>http://www.killersites.com/forums/post/11275/#p11275</guid>
		</item>
		<item>
			<title><![CDATA[Re: i need to show a form only when a checkbox is ticked]]></title>
			<link>http://www.killersites.com/forums/post/11260/#p11260</link>
			<description><![CDATA[<p>you CAN use jQuery indeed, but you dont NEED to use jQuery, just normal Javascript is fine.</p><p>the normal way:</p><p>say you have a checkbox, and the form you want to hide/show is contained inside a div with an id=&quot;myDiv&quot;<br /></p><div class="codebox"><pre><code>&lt;input type=&quot;checkbox&quot; value=&quot;myValue&quot; name=&quot;myName&quot; onchange=&quot;showHide(this)&quot;&gt;

&lt;div id=&quot;myDiv&gt;
&lt;form name=&quot;myForm&quot;&gt;
.....
&lt;/form&gt;
&lt;/div&gt;</code></pre></div><p>then you need a function called showHide that takes an element/object as a paramer -&gt; (this)<br /></p><div class="codebox"><pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
function showHide(obj)
{
    if(obj.checked){
        // if checkbox is checked then show div with id &quot;myDiv&quot;
        document.getElementById(&quot;myDiv&quot;).style.display = &quot;block&quot;;
    }
    else{
        // otherwise hide div with id &quot;myDiv&quot;
        document.getElementById(&quot;myDiv&quot;).style.display = &quot;none&quot;;
    }
}
&lt;/script&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (BeeDev)]]></author>
			<pubDate>Wed, 07 Oct 2009 11:14:09 +0000</pubDate>
			<guid>http://www.killersites.com/forums/post/11260/#p11260</guid>
		</item>
		<item>
			<title><![CDATA[i need to show a form only when a checkbox is ticked]]></title>
			<link>http://www.killersites.com/forums/post/11252/#p11252</link>
			<description><![CDATA[<p>i need to show a form only when a checkbox is ticked.<br />Im guessing i need to use jquery to do this.<br />Anyone know of a tutorial which explains this - or even better your advice.</p>]]></description>
			<author><![CDATA[dummy@example.com (stuck)]]></author>
			<pubDate>Wed, 07 Oct 2009 08:45:37 +0000</pubDate>
			<guid>http://www.killersites.com/forums/post/11252/#p11252</guid>
		</item>
	</channel>
</rss>
