<?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>Matthew Steven Kelly &#187; javascript</title>
	<atom:link href="http://www.matthewstevenkelly.com/blog/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.matthewstevenkelly.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 05 Feb 2012 04:43:00 +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>Agree To Terms Validation</title>
		<link>http://www.matthewstevenkelly.com/blog/random/agree-to-terms-validation.html</link>
		<comments>http://www.matthewstevenkelly.com/blog/random/agree-to-terms-validation.html#comments</comments>
		<pubDate>Fri, 06 Feb 2009 04:13:30 +0000</pubDate>
		<dc:creator>Matthew Steven Kelly</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">https://www.matthewstevenkelly.com/blog/?p=270</guid>
		<description><![CDATA[Every so often I need a simple script to validate an &#8220;agree to terms&#8221; check box for an HTML form. Here is a simple script I came up with to perform that validation using javascript: The code: &#60;script type=&#8221;text/javascript&#8221;&#62; &#60;!&#8211;  &#8230; <a href="http://www.matthewstevenkelly.com/blog/random/agree-to-terms-validation.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Every so often I need a simple script to validate an &#8220;agree to terms&#8221; check box for an HTML form. Here is a simple script I came up with to perform that validation using javascript:</p>
<p>The code:</p>
<div style="width:100%; overflow:auto; background-color:#CCCCCC;">
<div>&lt;script type=&#8221;text/javascript&#8221;&gt;</div>
<div>&lt;!&#8211; </div>
<div>function checkValues(form)</div>
<div>{</div>
<div>&nbsp;&nbsp;if ( form.terms.checked == false )</div>
<div>&nbsp;&nbsp;{</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;alert(&quot;You&nbsp;must&nbsp;check&nbsp;the&nbsp;AGREE&nbsp;TO&nbsp;TERMS&nbsp;AND&nbsp;PRICING&nbsp;box.&quot;);</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;return false; </div>
<div>&nbsp;&nbsp;}</div>
<div>&nbsp;&nbsp;form.submit();</div>
<div>}</div>
<div>&#8211;&gt;</div>
<div>&lt;/script&gt;</div>
<div>&lt;br&gt;&lt;form name=&quot;pricingterms&quot; action=&quot;validation.html&quot; method=post&gt;</div>
<div>&lt;div&nbsp;class=&quot;msg_head&#8221;&gt;&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;terms&quot;&nbsp;value=&quot;Yes&quot;&nbsp;/&gt;AGREE&nbsp;TO&nbsp;PRICING&nbsp;AND&nbsp;TERMS&lt;/div&gt;</div>
<div>&lt;br&gt;&lt;input&nbsp;type=&quot;button&quot;&nbsp;name=&quot;SubmitButton&quot;&nbsp;value=&quot;Register&nbsp;It&nbsp;Now&quot;&nbsp;onclick=&quot;checkValues(this.form)&quot;&nbsp;/&gt;</div>
<div>&lt;/form&gt;</div>
</div>
<p style="margin-top:20px;">And a form to test with:</p>
<div>
<h2>License Agreement Validation Form</h2>
<p><script type="text/javascript">
<!--
function checkValues(form){
if ( form.terms.checked == false ) { alert ( "You must check the AGREE TO TERMS AND PRICING box.");
return false; }
form.submit();
}
-->
</script></p>
<div>
<form id="pricingterms" action="http://www.matthewstevenkelly.com/blog/kb/html/agree-to-terms-validation.html" method="post">
<div class="msg_head">
<input type="checkbox" name="terms" value="Yes" />AGREE TO PRICING AND TERMS</div>
<input type="button" name="SubmitButton" value="Register It Now" onclick="checkValues(this.form)" />
</form>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewstevenkelly.com/blog/random/agree-to-terms-validation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Analytics Tracking Code Snippet</title>
		<link>http://www.matthewstevenkelly.com/blog/random/google-analytics-tracking-code-snippet.html</link>
		<comments>http://www.matthewstevenkelly.com/blog/random/google-analytics-tracking-code-snippet.html#comments</comments>
		<pubDate>Wed, 21 Jan 2009 03:17:30 +0000</pubDate>
		<dc:creator>Matthew Steven Kelly</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">https://www.matthewstevenkelly.com/blog/?p=199</guid>
		<description><![CDATA[I just updated my web site pages with the new Google Analytics tracking code snippet. It fixes a rare javascript pop-up error message by using a try-catch snippet. If you are familiar with object oriented programming languages, try-catch statements are &#8230; <a href="http://www.matthewstevenkelly.com/blog/random/google-analytics-tracking-code-snippet.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just updated my web site pages with the new <a href="http://analytics.blogspot.com/2009/01/short-answer-is-you-dont-have-to-change.html">Google Analytics tracking code snippet</a>. It fixes a rare javascript pop-up error message by using a try-catch snippet. If you are familiar with object oriented programming languages, try-catch statements are nothing new. If you aren&#8217;t familiar&#8230; well the Google article gives you everything you need to know.</p>
<p>For more on javascript try catch statements:<br />
<a href="http://www.w3schools.com/jS/js_try_catch.asp">http://www.w3schools.com/jS/js_try_catch.asp</a></p>
<p>Have you updated your snippets?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewstevenkelly.com/blog/random/google-analytics-tracking-code-snippet.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

