<?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>Web Development Blog &#187; alerts</title>
	<atom:link href="http://www.leigeber.com/tag/alerts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leigeber.com</link>
	<description>This web development blog features fresh articles on JavaScript, AJAX, CSS, XHTML, PHP, Photoshop and more.</description>
	<lastBuildDate>Sat, 13 Feb 2010 02:05:55 +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>Dynamic JavaScript Form Validation</title>
		<link>http://www.leigeber.com/2008/04/dynamic-inline-javascript-form-validation/</link>
		<comments>http://www.leigeber.com/2008/04/dynamic-inline-javascript-form-validation/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 15:23:16 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=33</guid>
		<description><![CDATA[This lightweight JavaScript form validation script allows you to easily add attractive validation messages to your forms. There is no markup to add on your existing page since the divs and positioning are dynamically generated.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2008/04/msg_screenshot.gif" alt="Message Screenshot" width="459" height="185" /></p>
<p>This lightweight JavaScript form validation allows you to easily add attractive validation messages to your forms. There is no markup to add on your existing page. Just call the inlineMsg() function when you wish to display a message. The position of the form element (or any other element) is dynamically calculated.</p>
<p>Call the function as follows.</p>
<pre class="brush: jscript;">inlineMsg('name','You must enter your name.',2);</pre>
<p>The first parameter is the id of the element you wish to display the warning in relation to. The second is the string you wish to display in the message box. You can include HTML, just be sure and escape when necessary. The third parameter is the time to display the message in seconds. It is optional and if left empty will default to the MSGHIDE variable in the JavaScript which is initially set to 3.</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.leigeber.com/messages/messages.html" target="_blank">Click here for the demo</a>.</strong></p>
<p><strong><a href="http://www.leigeber.com/wp-content/uploads/2008/04/messages.zip">Click here to download the source.</a></strong></p>
<p><strong>Update 5/5/2008</strong> &#8211; Updated the script to focus to the erroneous textbox when displaying an alert. Thanks to mbh for the suggestion.<br />
<strong>Update 6/2/2008</strong> &#8211; Resolved issue with form field focus on non textbox fields. Added select dropdown to the demo and source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2008/04/dynamic-inline-javascript-form-validation/feed/</wfw:commentRss>
		<slash:comments>137</slash:comments>
		</item>
	</channel>
</rss>
