<?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>James Wiseman &#187; HTML</title>
	<atom:link href="http://www.jameswiseman.com/blog/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jameswiseman.com/blog</link>
	<description>My Programming Notebook and Other Things</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:13:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Don&#8217;t Rely On A Disabled Button</title>
		<link>http://www.jameswiseman.com/blog/2010/10/25/dont-rely-on-a-disabled-button/</link>
		<comments>http://www.jameswiseman.com/blog/2010/10/25/dont-rely-on-a-disabled-button/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 19:21:04 +0000</pubDate>
		<dc:creator>jameswiseman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://www.jameswiseman.com/blog/?p=1663</guid>
		<description><![CDATA[Most of us have probably done it. A web page, some fields, and a button. The button is disabled until you fill-out/select the required fields. Here is our disabled button: But, how disabled is it? Well, as it turns out, not very. I&#8217;m assuming that if you&#8217;re reading this you&#8217;ll have Firefox with Firebug installed [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.jameswiseman.com/blog/wp-content/uploads/2010/10/Firebug.jpg"></a>Most of us have probably done it. A web page, some fields, and a button. The button is disabled until you fill-out/select the required fields.</p>
<p>Here is our disabled button:</p>
<p><script type="text/javascript">// <![CDATA[
   function displaymessage() {     alert("You're not meant to see me!"); }
// ]]&gt;</script></p>
<input id="dontrelyonabuttonbutton" onclick="displaymessage();" disabled="disabled" type="button" value="Click Me" />
<p>But, how disabled is it?</p>
<p>Well, as it turns out, not very.</p>
<p>I&#8217;m assuming that if you&#8217;re reading this you&#8217;ll have Firefox with Firebug installed (even if you don&#8217;t use it all that much). Either that or you&#8217;ll have IE with the developer toolbar. Either way, hit F12 &#8211; this should bring it up.</p>
<p>However which way you can, navigate to the point in the DOM containing the &#8216;Click Me&#8217; button.</p>
<p><a href="http://www.jameswiseman.com/blog/wp-content/uploads/2010/10/Firebug1.jpg"><img class="alignnone size-full wp-image-1689" title="Firebug" src="http://www.jameswiseman.com/blog/wp-content/uploads/2010/10/Firebug1.jpg" alt="" width="700" height="151" /></a></p>
<p>You&#8217;ll then be able to delete the &#8216;disabled&#8217; attribute, allowing you to click the button.</p>
<p>This is where some good server-side validation comes in handy. Never rely on JavaScript or HTML styles/attributes alone. They can always be circumvented. Server-side validation, broadly speaking, cannot!</p>
<div class="shr-publisher-1663"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F10%2F25%2Fdont-rely-on-a-disabled-button%2F' data-shr_title='Don%27t+Rely+On+A+Disabled+Button'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F10%2F25%2Fdont-rely-on-a-disabled-button%2F' data-shr_title='Don%27t+Rely+On+A+Disabled+Button'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.jameswiseman.com/blog/2010/10/25/dont-rely-on-a-disabled-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should One HTML Radio Button Always Be Checked?</title>
		<link>http://www.jameswiseman.com/blog/2010/08/11/should-one-html-radio-button-always-be-checked/</link>
		<comments>http://www.jameswiseman.com/blog/2010/08/11/should-one-html-radio-button-always-be-checked/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 12:31:09 +0000</pubDate>
		<dc:creator>jameswiseman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Radio-Buttons]]></category>

		<guid isPermaLink="false">http://www.jameswiseman.com/blog/?p=1272</guid>
		<description><![CDATA[Recently I encountered a business requirement whereby it was stipulated that both radio buttons in a group be left unchecked. In addition to this, a check was required to forcing the user to select one before they can continue. This struck me as being direct contradiction as to what a Radio button was trying to [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Recently I encountered a business requirement whereby it was stipulated that both radio buttons in a group be left unchecked. In addition to this, a check was required to forcing the user to select one before they can continue.<a href="http://www.jameswiseman.com/blog/wp-content/uploads/2010/08/radiobutton.jpg"><img class="size-full wp-image-1278 alignright" title="radiobutton" src="http://www.jameswiseman.com/blog/wp-content/uploads/2010/08/radiobutton.jpg" alt="radio button" width="150" height="130" /></a></p>
<p>This struck me as being direct contradiction as to what a Radio button was trying to achieve, and that it was actually more work as you were forcing the user to make a choice without giving them a default.</p>
<p>It just felt wrong.</p>
<p>But I wasn&#8217;t sure, so I did a bit of research, and came up with the following.</p>
<p>Firstly (and some could say, lastly) there is the W3 Recommendation at <a rel="nofollow" href="http://www.w3.org/TR/html401/interact/forms.html#radio">http://www.w3.org/TR/html401/interact/forms.html#radio</a>:</p>
<blockquote><p>At all times, exactly one of the radio buttons in a set is checked.</p></blockquote>
<p>And that ought to be it, but for completeness, here is quite a nice set of guidelines regarding this <a href="http://www.useit.com/alertbox/20040927.html">http://www.useit.com/alertbox/20040927.html</a>:</p>
<blockquote><p><strong>Always offer a default selection for radio button lists</strong>. By definition, radio buttons always have exactly one option selected, and you therefore shouldn&#8217;t display them without a default selection. (Checkboxes, in contrast, often default to having none of the options selected.)</p>
<li>If users might need to refrain from making a selection, you should provide a radio button for this choice, such as one labeled &#8220;None.&#8221; Offering users an explicit, neutral option to click is better than requiring the implicit act of not selecting from the list, especially because doing the latter violates the rule of always having exactly one option chosen.</li>
</blockquote>
<div>Personally, it was nice to pin this down and get some good points of reference.</div>
<div class="shr-publisher-1272"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F08%2F11%2Fshould-one-html-radio-button-always-be-checked%2F' data-shr_title='Should+One+HTML+Radio+Button+Always+Be+Checked%3F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F08%2F11%2Fshould-one-html-radio-button-always-be-checked%2F' data-shr_title='Should+One+HTML+Radio+Button+Always+Be+Checked%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.jameswiseman.com/blog/2010/08/11/should-one-html-radio-button-always-be-checked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn CSS Positioning in Ten Steps</title>
		<link>http://www.jameswiseman.com/blog/2010/08/06/learn-css-positioning-in-ten-steps/</link>
		<comments>http://www.jameswiseman.com/blog/2010/08/06/learn-css-positioning-in-ten-steps/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 19:00:52 +0000</pubDate>
		<dc:creator>jameswiseman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Beer]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.jameswiseman.com/blog/?p=1193</guid>
		<description><![CDATA[I probably should understand more about CSS positioning and layout styles on HTML DIVs, as its integral to today&#8217;s modern web page. The days where I used to lay everything out in a borderless HTML table are long gone, but despite this many of the features of DIV positioning remained a mystery to me until [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I probably should understand more about CSS positioning and layout styles on HTML DIVs, as its integral to today&#8217;s modern web page.<a href="http://www.jameswiseman.com/blog/wp-content/uploads/2010/08/jason-miller-beer.jpg"><img class="alignright size-medium wp-image-1249" title="jason-miller-beer" src="http://www.jameswiseman.com/blog/wp-content/uploads/2010/08/jason-miller-beer-300x201.jpg" alt="Beer" width="300" height="201" /></a></p>
<p>The days where I used to lay everything out in a borderless HTML table are long gone, but despite this many of the features of DIV positioning remained a mystery to me until I stumbled across <a title="Learn CSS Positioning in Ten Steps" href="http://www.barelyfitz.com/screencast/html-training/css/positioning/" target="_blank">Barely Fitz Designs Learn CSS Positioning in Ten Steps</a>.</p>
<p>You get ten simple demonstrations on the positioning options, which covers all you need to know. Practice, as always, makes perfect, to its worthwhile having a play yourself.</p>
<p>He even invites you to buy him a beer for his efforts. I didn&#8217;t, but don&#8217;t let that stop you.</p>
<p>Mmmm, now I&#8217;m thirsty.</p>
<div class="shr-publisher-1193"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F08%2F06%2Flearn-css-positioning-in-ten-steps%2F' data-shr_title='Learn+CSS+Positioning+in+Ten+Steps'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F08%2F06%2Flearn-css-positioning-in-ten-steps%2F' data-shr_title='Learn+CSS+Positioning+in+Ten+Steps'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.jameswiseman.com/blog/2010/08/06/learn-css-positioning-in-ten-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSFiddle the Stackoverflow Answer Race</title>
		<link>http://www.jameswiseman.com/blog/2010/07/30/jsfiddle-the-stackoverflow-answer-race/</link>
		<comments>http://www.jameswiseman.com/blog/2010/07/30/jsfiddle-the-stackoverflow-answer-race/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 13:08:07 +0000</pubDate>
		<dc:creator>jameswiseman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Stackoverflow]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.jameswiseman.com/blog/?p=1143</guid>
		<description><![CDATA[Have you ever found yourself wanting to test out a bit of HTML/CSS/JavaScript without having access to an IDE or being bothered to fire it up? Do you want to hack prototype a bit of code quickly without fuss? Or maybe you&#8217;re one of those StackOverflow answerers that Race To Get The First Answer In. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Have you ever found yourself wanting to test out a bit of HTML/CSS/JavaScript without having access to an IDE or being bothered to fire it up?</p>
<p>Do you want to <span style="text-decoration: line-through;">hack </span>prototype a bit of code quickly without fuss?</p>
<p>Or maybe you&#8217;re one of those StackOverflow answerers that <a title="stackoverflow answer race" href="http://meta.stackoverflow.com/questions/58823/feature-for-people-who-race-to-be-the-first-to-answer-questions" target="_blank">Race To Get The First Answer In</a>.</p>
<p>If your answer is &#8216;yes&#8217; or &#8216;I am actually&#8217; then there&#8217;s probably a myriad of different resources you can call upon to help out, but you might consider <a title="JSFilddle" href="http://jsfiddle.net/" target="_blank">JSFiddle </a></p>
<p>I created  a really simple bit of code:</p>
<p><strong>HTML</strong></p>
<pre name="code" class="html">&lt;input type="checkbox" /&gt;</pre>
<p><strong>JavaScript/jQuery</strong></p>
<pre name="code" class="javascript">$("input").click(function(){alert("test");});</pre>
<p>Then I selected &#8216;jQuery 1.4.2.&#8217; from the &#8216;Choose Framework&#8217; section and clicked run.</p>
<p>When I clicked on the checkbox, everything hung together like a dream:<br />
<a href="http://www.jameswiseman.com/blog/wp-content/uploads/2010/07/jsfiddle1.jpg"><img class="alignnone size-full wp-image-1147" title="jsfiddle" src="http://www.jameswiseman.com/blog/wp-content/uploads/2010/07/jsfiddle1.jpg" alt="" width="807" height="267" /></a></p>
<p>At the time of writing the blurb stated that it was still under heavy development, however I still thought it was a genuinely nice little tool that I wanted to share.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_a.png?x-id=d80bfaa1-e992-4bb9-b3cb-ad2fd00f6a43" alt="Enhanced by Zemanta" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<div class="shr-publisher-1143"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F07%2F30%2Fjsfiddle-the-stackoverflow-answer-race%2F' data-shr_title='JSFiddle+the+Stackoverflow+Answer+Race'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jameswiseman.com%2Fblog%2F2010%2F07%2F30%2Fjsfiddle-the-stackoverflow-answer-race%2F' data-shr_title='JSFiddle+the+Stackoverflow+Answer+Race'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.jameswiseman.com/blog/2010/07/30/jsfiddle-the-stackoverflow-answer-race/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<img style='margin:0;padding:0;border:0;' width='1px' height='1px' src="http://www.jameswiseman.com/blog/wp-content/plugins/mystat/mystat.php?act=time_load&id=616971&rnd=1100379666" /></channel>
</rss>

