<?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>Is Good Stuff &#187; spry ajax</title>
	<atom:link href="http://www.isgoodstuff.com/tag/spry-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.isgoodstuff.com</link>
	<description>For all the good things!</description>
	<lastBuildDate>Mon, 26 Jul 2010 01:38:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Let&#8217;s Spry some AJAX!</title>
		<link>http://www.isgoodstuff.com/2008/07/14/lets-spry-some-ajax/</link>
		<comments>http://www.isgoodstuff.com/2008/07/14/lets-spry-some-ajax/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 13:53:07 +0000</pubDate>
		<dc:creator>Mr.GoodStuff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Useful Scripts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[spry ajax]]></category>

		<guid isPermaLink="false">http://www.isgoodstuff.com/2008/07/14/lets-spry-some-ajax/</guid>
		<description><![CDATA[What&#8217;s Spry? Spry is one of the &#8220;silent&#8221; AJAX framework that used to resides behinds the application of dreamweaver CS3. It is used by designers to develop AJAX applications using Dreamweaver. This baby is quite a comprehensive and easiest to use high-level framework I&#8217;ve seen so far. You can actually use this open source framework [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="lightbox" href="http://www.isgoodstuff.com/wp-content/uploads/2008/07/spry-title.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.isgoodstuff.com/wp-content/uploads/2008/07/spry-title-thumb.jpg" border="0" alt="spry_title" width="504" height="139" /></a></p>
<p>What&#8217;s Spry? Spry is one of the &#8220;silent&#8221; AJAX framework that used to resides behinds the application of dreamweaver CS3. It is used by designers to develop AJAX applications using Dreamweaver. </p>
<p>This baby is quite a comprehensive and easiest to use high-level framework I&#8217;ve seen so far. You can actually use this open source framework like others because Adobe actually license it free. </p>
<p>However, the only problem is that; they aren&#8217;t much any good or simple examples for beginners (those that do not have Dreamweaver) to start with.</p>
<p>Adobe examples are some what mixed up hardcore example. Sometimes, is just good to start with simple samples first before going to hardcore samples.</p>
<p>Today&#8217;s post is about simple form validation samples. Now some of you may say, why yet another AJAX validation. Wait till you see what this framework has to offer.</p>
<p> </p>
<p><span id="more-111"></span></p>
<p>Like all AJAX framework, Adobe Spry framework open source and is a free to use for all purposes including commercial. To download Spry AJAX framework (1.6.1 latest as to date of the post), you can head to <a href="http://labs.adobe.com/technologies/spry/"><strong>Spry homepage</strong></a>.</p>
<p>If you have Aptana better still, just start web project, and pick Spry Ajax framework and the project will insert the framework into the project.</p>
<p>To begin with this tutorial download the <strong>materials here</strong> <a href='#' onclick='javascript:window.open("/tag/spry-ajax/feed/?download=10","Window1","menubar=no,width=400,height=200,toolbar=no, left="+((screen.width/2)-200)+", top="+((screen.height/2)-100));return false;' style="background:url('http://www.isgoodstuff.com/wp-content/plugins/download-manager/d24.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a>. (included portion of the framework js). Notice there&#8217;s four textfields inside this form. SpryValidationTextField.js and SpryValidationTextField.css is obtainable inside the widget folder inside the library, you need to attach it to your file to use it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=iso-8859-1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Simple Form Validator<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;SpryValidationTextField.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;SpryValidationTextField.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;form1&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;form1&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> padding<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;5&quot;</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;right&quot;</span>&gt;</span>Name : <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sprytextfield1&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textName&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textName&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldRequiredMsg&quot;</span>&gt;</span>A value is required.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;right&quot;</span>&gt;</span>Age : <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sprytextfield2&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textAge&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textAge&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldRequiredMsg&quot;</span>&gt;</span>A value is required.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldInvalidFormatMsg&quot;</span>&gt;</span>Invalid format.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;right&quot;</span>&gt;</span>Email : <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sprytextfield3&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textEmail&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textEmail&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldRequiredMsg&quot;</span>&gt;</span>A value is required.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldInvalidFormatMsg&quot;</span>&gt;</span>Invalid format.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;right&quot;</span>&gt;</span>Phone : <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sprytextfield4&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textPhone&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textPhone&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldRequiredMsg&quot;</span>&gt;</span>A value is required.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldInvalidFormatMsg&quot;</span>&gt;</span>Invalid format.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
                <span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">                var sprytextfield1 = new Spry.Widget.ValidationTextField(&quot;sprytextfield1&quot;, 'none', {validateOn: ['change']});</span>
<span style="color: #808080; font-style: italic;">                var sprytextfield2 = new Spry.Widget.ValidationTextField(&quot;sprytextfield2&quot;, &quot;integer&quot;, {validateOn:[&quot;change&quot;]});</span>
<span style="color: #808080; font-style: italic;">                var sprytextfield3 = new Spry.Widget.ValidationTextField(&quot;sprytextfield3&quot;, &quot;email&quot;, {validateOn:[&quot;blur&quot;]});</span>
<span style="color: #808080; font-style: italic;">                var sprytextfield4 = new Spry.Widget.ValidationTextField(&quot;sprytextfield4&quot;, &quot;phone_number&quot;, {validateOn:[&quot;blur&quot;], useCharacterMasking:true});</span>
<span style="color: #808080; font-style: italic;">                //--&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p> </p>
<p><strong>Take Note:</strong></p>
<p>Each <strong>validation only checks a textfield if it&#8217;s wrapped so called &#8220;validation&#8221; span</strong>. To do this, simply wrap span tag with an id. After that, you will most like to insert a &#8220;error response&#8221; span right after the input textbox. See code below :-</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>15
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sprytextfield2&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textAge&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textAge&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldRequiredMsg&quot;</span>&gt;</span>A value is required.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textfieldInvalidFormatMsg&quot;</span>&gt;</span>Invalid format.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span></pre></td></tr></table></div>

<p>You will need to script the validation trigger script like below. Make sure the same validation span&#8217;s id is used. Notice in code below you can validate some of this textboxes and Spry also support masking like special character that appears with phone number to make them look neater. </p>
<p>The second parameter is to check specific data type or format. </p>
<ul>
<li>None checks for mandatory field, </li>
<li>integer checks for integer data type,</li>
<li>email checks for valid email</li>
<li>and phone_number is to check standard phone number format.</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>30
31
32
33
34
35
36
37
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;!--</span>
                <span style="color: #003366; font-weight: bold;">var</span> sprytextfield1 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Spry.<span style="color: #660066;">Widget</span>.<span style="color: #660066;">ValidationTextField</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;sprytextfield1&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'none'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>validateOn<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'change'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> sprytextfield2 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Spry.<span style="color: #660066;">Widget</span>.<span style="color: #660066;">ValidationTextField</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;sprytextfield2&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;integer&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>validateOn<span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;change&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> sprytextfield3 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Spry.<span style="color: #660066;">Widget</span>.<span style="color: #660066;">ValidationTextField</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;sprytextfield3&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;email&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>validateOn<span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;blur&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> sprytextfield4 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Spry.<span style="color: #660066;">Widget</span>.<span style="color: #660066;">ValidationTextField</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;sprytextfield4&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;phone_number&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>validateOn<span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;blur&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> useCharacterMasking<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//--&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Do take a look at more complex example as you go along. Happy coding! <img src='http://www.isgoodstuff.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="text-align:left"><a style="text-align:left" href="javascript:toggleStartStop();PicLensLite.start({feedUrl:'http://www.isgoodstuff.com/wp-content/plugins/wp-piclens/mrss.php?id=111'});">Start Slide Show with PicLens Lite <img src="http://www.isgoodstuff.com/wp-content/plugins/wp-piclens/PicLensButton.png" alt="PicLens" width="16" height="12" border="0" align="top"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.isgoodstuff.com/2008/07/14/lets-spry-some-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
