<?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>Expressing IT &#187; Form Elements</title>
	<atom:link href="http://developer.expressionz.in/blogs/tag/form-elements/feed/" rel="self" type="application/rss+xml" />
	<link>http://developer.expressionz.in/blogs</link>
	<description>User Interface : just another, but a serious developers weblog</description>
	<lastBuildDate>Thu, 20 May 2010 18:05:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IS disabled=&#8221;true&#8221; and disabled=&#8221;false&#8221;  the same?</title>
		<link>http://developer.expressionz.in/blogs/2009/03/24/is-disabledtrue-and-disabledfalse-the-same/</link>
		<comments>http://developer.expressionz.in/blogs/2009/03/24/is-disabledtrue-and-disabledfalse-the-same/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 07:00:33 +0000</pubDate>
		<dc:creator>Nikhil</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavasScript]]></category>
		<category><![CDATA[Form Elements]]></category>

		<guid isPermaLink="false">http://developer.expressionz.in/blogs/?p=137</guid>
		<description><![CDATA[So is disabled="true" and disabled="false" same? 
<strong>Yes... here is some quick explanation...</strong>
"disabled" is an attribute of any form element/field and hence  can accept any value by its nature. So as long as this attribute is present, the element will be disabled regardless of its value]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F24%2Fis-disabledtrue-and-disabledfalse-the-same%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdeveloper.expressionz.in%2Fblogs%2F2009%2F03%2F24%2Fis-disabledtrue-and-disabledfalse-the-same%2F&amp;source=nikhild&amp;style=normal&amp;hashtags=Form+Elements" height="61" width="50" /><br />
			</a>
		</div>
<p>This ones old school , but as usual it is my memory supplement &#8230;<br />
<strong>So is disabled=&#8221;true&#8221; and disabled=&#8221;false&#8221; same?Yes</strong><br />
&#8230; Don&#8217;t believe, well! thats the way it is &#8230; here is some quick explanation&#8230;<br />
&#8220;disabled&#8221; is an attribute of any form element/field and hence  can accept any value by its nature.</p>
<blockquote><p>As long as this attribute is present, the element will be disabled regardless of its value. for eg.<br />
<em>&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled=&#8221;disabled&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled=&#8221;true&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;This is disabled&#8221; disabled=&#8221;false&#8221;&gt;</em></p>
<p>All of the above will make the this form field &#8220;DISABLED&#8221;.</p>
<p>Simply not providing the attribute &#8220;DISABLED&#8221; keeps the Field &#8220;ABLED&#8221; &#8230; like below</p>
<p><em>&lt;input type=&#8221;text&#8221; value=&#8221;This is not disabled&#8221; /&gt;</em></p></blockquote>
<p>Remember &#8220;<strong>Any value (or no value at all) of the disabled attribute, the browser will render it disabled</strong>&#8221; . To keep things clear in our minds W3C recommends that we use <strong>disabled=&#8221;disabled&#8221;</strong> in these situations.</p>
<blockquote><p>This is difference though when we use this attribute in javascript &#8230;<br />
<em><strong><br />
</strong>document.form.element.disabled = true; //the element will be disabled<br />
document.form.element.disabled = false; //the element will be enabled</em></p></blockquote>
<p>The above arguments are also true for these attributes and elements :<strong><br />
</strong></p>
<ul>
<li><strong> checked (radio button and checkbox)</strong></li>
<li><strong> selected (option)</strong></li>
<li><strong> nowrap (td) </strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://developer.expressionz.in/blogs/2009/03/24/is-disabledtrue-and-disabledfalse-the-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
