<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.bytemycode.com/rssformat.xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>byteMyCode: Snippets for "form input"</title>
		<link>http://www.bytemycode.com</link>
		<description>Snippets for this tag.</description>
		<pubDate>Wed, 09 Jul 2008 03:08:57 +0000</pubDate>
		<copyright>1998-2008 </copyright>
		<language>en-us</language>
		<image>
		      <link>http://www.bytemycode.com</link>
		      <url>http://www.bytemycode.com/img/rss_title.gif</url>
		      <title>byteMyCode</title>
		</image>

	<item>
	<title>Drop-In Form Autofocus Script</title>
	<link>http://www.bytemycode.com/snippets/snippet/732/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/732/comments/</comments>
	<pubDate>Tue, 25 Sep 2007 10:50:13 +0000</pubDate>
	<dc:creator>chaos</dc:creator>
	<category>"form input", "input focus", autofocus, JavaScript</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/732/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 25th, 2007  10:50 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/732/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/chaos/" title="Helper">chaos</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22form+input%22">"form input"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22input+focus%22">"input focus"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/autofocus">autofocus</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/732/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 3
			<p>This script performs reliable, cross-browser input autofocus that often can be used simply by dropping it in, with no modifications to the form or HTML body.  It refuses to switch focus if it detects that the user has interacted with the form (avoiding a major source of annoyance with autofocus scripts) and correctly handles Firefox tabs opened "in the background", which most autofocus scripts fail on.  Official home is on the <a href='http://lostsouls.org/grimoire_form_autofocus' target="_blank">Lost Souls MUD Grimoire</a>.</p>
		]]>
	</description>
</item><item>
	<title>Create JComboBox Model From Enum</title>
	<link>http://www.bytemycode.com/snippets/snippet/482/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/482/comments/</comments>
	<pubDate>Mon, 23 Oct 2006 17:35:26 +0000</pubDate>
	<dc:creator>jonathanstarrett</dc:creator>
	<category>"form input", Java, JComboBox</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/482/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Oct. 23rd, 2006  5:35 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/482/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/jonathanstarrett/" title="Beginner">jonathanstarrett</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22form+input%22">"form input"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Java">Java</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/JComboBox">JComboBox</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/482/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 4
			<p>I was looking for an easy way to populate a combo box with strings taken from an enumeration, and also to be able to pull out Enum objects from the combo box. After some searching, I found EnumComboBoxModel on the JDesktop website, but was not able to find any code.<br /><br />Instead I came up with an easier solution that did not require me to define a new Model class, but instead uses javax.swing.DefaultComboBoxModel.<br /><br />Sorry for the disorganization of the code, but hopefully you get the idea.</p>
		]]>
	</description>
</item><item>
	<title>Sanitize form input using CGI.pm</title>
	<link>http://www.bytemycode.com/snippets/snippet/439/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/439/comments/</comments>
	<pubDate>Mon, 09 Oct 2006 08:44:09 +0000</pubDate>
	<dc:creator>RobHarrigan</dc:creator>
	<category>"form input", "SQL Injection", Clean, Prevent, XSS</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/439/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Oct. 9th, 2006  8:44 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/439/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/RobHarrigan/" title="Helper">RobHarrigan</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22form+input%22">"form input"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22SQL+Injection%22">"SQL Injection"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Clean">Clean</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Prevent">Prevent</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/XSS">XSS</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/439/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>Sanitize form input using CGI.pm to prevent XXS & SQL injections:</p>
		]]>
	</description>
</item>
	</channel>
</rss>