<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to create input masks in HTML</title>
	<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/</link>
	<description>Stay curious!</description>
	<pubDate>Fri, 05 Sep 2008 06:43:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: bisi2poche</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-15055</link>
		<author>bisi2poche</author>
		<pubDate>Fri, 22 Aug 2008 09:27:57 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-15055</guid>
		<description>Thank's a lot for this usefull script.

I notice that setupElementMasks should use : $$('.input_mask')
instead of document.getElementsByClassName
(I don't know why, but getElementsByClassName give me an error with prototype 1.6.0.2)</description>
		<content:encoded><![CDATA[<p>Thank&#8217;s a lot for this usefull script.</p>
<p>I notice that setupElementMasks should use : $$(&#8217;.input_mask&#8217;)<br />
instead of document.getElementsByClassName<br />
(I don&#8217;t know why, but getElementsByClassName give me an error with prototype 1.6.0.2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14716</link>
		<author>Mike</author>
		<pubDate>Thu, 12 Jun 2008 15:07:06 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14716</guid>
		<description>To enable the keypad in IE7.0  replace the applyMask function with the code below.

&lt;code&gt;
 applyMask: function(event) {
      var match = /mask_(\w )/.exec(this.className);
      if ( match.length == 2 &#38;&#38; Xaprb.InputMask.masks[match[1]] ) {
         var mask = Xaprb.InputMask.masks[match[1]];
         var key  = Xaprb.InputMask.getKey(event);
	
	// correction for numeric keypad
            if (key &#62;= 96 &#38;&#38; key </description>
		<content:encoded><![CDATA[<p>To enable the keypad in IE7.0  replace the applyMask function with the code below.</p>
<p><code><br />
 applyMask: function(event) {<br />
      var match = /mask_(\w )/.exec(this.className);<br />
      if ( match.length == 2 &amp;&amp; Xaprb.InputMask.masks[match[1]] ) {<br />
         var mask = Xaprb.InputMask.masks[match[1]];<br />
         var key  = Xaprb.InputMask.getKey(event);</code></p>
<p>	// correction for numeric keypad<br />
            if (key &gt;= 96 &amp;&amp; key</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14374</link>
		<author>Xaprb</author>
		<pubDate>Tue, 01 Apr 2008 14:11:09 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14374</guid>
		<description>Hi all,

I'm sorry but I don't have time or need to maintain this or help people with it.  I would love it if someone would take on the task of maintaining it.  Please leave a comment with the URL of the new home for it, if you decide to maintain and improve it.</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>I&#8217;m sorry but I don&#8217;t have time or need to maintain this or help people with it.  I would love it if someone would take on the task of maintaining it.  Please leave a comment with the URL of the new home for it, if you decide to maintain and improve it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Asif</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14372</link>
		<author>Muhammad Asif</author>
		<pubDate>Tue, 01 Apr 2008 09:24:31 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14372</guid>
		<description>Can I place a mask inside the text field pre populated. This will give a clue to the end user entering the date. Thanks. I am unable to do so till now.</description>
		<content:encoded><![CDATA[<p>Can I place a mask inside the text field pre populated. This will give a clue to the end user entering the date. Thanks. I am unable to do so till now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhett135</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14269</link>
		<author>Rhett135</author>
		<pubDate>Tue, 04 Mar 2008 14:41:03 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14269</guid>
		<description>Very nice, helpful!
Is there a smaller version of prototype.js available, with only the necessary code for this mask?</description>
		<content:encoded><![CDATA[<p>Very nice, helpful!<br />
Is there a smaller version of prototype.js available, with only the necessary code for this mask?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy6</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14133</link>
		<author>Jimmy6</author>
		<pubDate>Mon, 07 Jan 2008 16:33:06 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-14133</guid>
		<description>it does not work in IE7. "/.;'," all there symbol can be inserted</description>
		<content:encoded><![CDATA[<p>it does not work in IE7. &#8220;/.;&#8217;,&#8221; all there symbol can be inserted</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay Nair</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-12868</link>
		<author>Jay Nair</author>
		<pubDate>Thu, 02 Aug 2007 12:55:12 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-12868</guid>
		<description>thank u so much for this, it really helped me a lot. can the delete key and the numbers on the num pad be activated? if yes, please let me know. thanx once again.</description>
		<content:encoded><![CDATA[<p>thank u so much for this, it really helped me a lot. can the delete key and the numbers on the num pad be activated? if yes, please let me know. thanx once again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-11569</link>
		<author>Xaprb</author>
		<pubDate>Thu, 14 Jun 2007 01:13:43 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-11569</guid>
		<description>It's LGPL.  I don't want to license it any more liberally than that, though of course you are free to inspect the source and design your own implementation of the same thing.</description>
		<content:encoded><![CDATA[<p>It&#8217;s LGPL.  I don&#8217;t want to license it any more liberally than that, though of course you are free to inspect the source and design your own implementation of the same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-11567</link>
		<author>Oliver</author>
		<pubDate>Wed, 13 Jun 2007 23:18:27 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-11567</guid>
		<description>You have this licensed under the GPL.  I'd like to use this code in on of my web application products.  Will you give your permission for this use?</description>
		<content:encoded><![CDATA[<p>You have this licensed under the GPL.  I&#8217;d like to use this code in on of my web application products.  Will you give your permission for this use?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Werner Cloete</title>
		<link>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-6423</link>
		<author>Werner Cloete</author>
		<pubDate>Tue, 08 May 2007 14:03:17 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/#comment-6423</guid>
		<description>&lt;p&gt;Good day, everyone...

I changed the input masks' place holders to enable us to use spaces in our masks...

Here is a sample of the new masks:&lt;/p&gt;
&lt;pre&gt;
		date:
		{
			format:	'§§/§§/§§§§',	// Werner Cloete - 02/05/2007 - Make use of a new "§" mask place holder
			regex:	/\d/
		},
		phone:
		{
			format:	'§§§ §§§-§§§§',	// Werner Cloete - 02/05/2007 - Make use of a new "§" mask place holder
			regex:	/\d/
		}
&lt;/pre&gt;

&lt;p&gt;The "§" character is created with [Alt]+21...

I also updated the code to display the mask's next set character as you type...so, for example, if you're using the date mask, and you have already typed "12", the "/" will immediately appear...

Here is the updated code:&lt;/p&gt;

&lt;pre&gt;/*					if ( mask.format.charAt(pos - 1) != ' ' ) */				// Werner Cloete - 02/05/2007 - Commented out the code
					if ( mask.format.charAt(pos) != '§' )						// Werner Cloete - 02/05/2007 - Changed the code to use the new "§" mask place holder
					{
/*						str = this.value + mask.format.charAt(pos - 1) + ch; */	// Werner Cloete - 02/05/2007 - Commented out the code
						str = this.value + ch + mask.format.charAt(pos);		// Werner Cloete - 02/05/2007 - Changed the order in which the strings are concatenated
					}&lt;/pre&gt;

&lt;p&gt;I hope that this will prove useful...

Yours sincerely

Werner&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Good day, everyone&#8230;</p>
<p>I changed the input masks&#8217; place holders to enable us to use spaces in our masks&#8230;</p>
<p>Here is a sample of the new masks:</p>
<pre>
		date:
		{
			format:	'§§/§§/§§§§',	// Werner Cloete - 02/05/2007 - Make use of a new "§" mask place holder
			regex:	/d/
		},
		phone:
		{
			format:	'§§§ §§§-§§§§',	// Werner Cloete - 02/05/2007 - Make use of a new "§" mask place holder
			regex:	/d/
		}
</pre>
<p>The &#8220;§&#8221; character is created with [Alt]+21&#8230;</p>
<p>I also updated the code to display the mask&#8217;s next set character as you type&#8230;so, for example, if you&#8217;re using the date mask, and you have already typed &#8220;12&#8243;, the &#8220;/&#8221; will immediately appear&#8230;</p>
<p>Here is the updated code:</p>
<pre>/*					if ( mask.format.charAt(pos - 1) != ' ' ) */				// Werner Cloete - 02/05/2007 - Commented out the code
					if ( mask.format.charAt(pos) != '§' )						// Werner Cloete - 02/05/2007 - Changed the code to use the new "§" mask place holder
					{
/*						str = this.value + mask.format.charAt(pos - 1) + ch; */	// Werner Cloete - 02/05/2007 - Commented out the code
						str = this.value + ch + mask.format.charAt(pos);		// Werner Cloete - 02/05/2007 - Changed the order in which the strings are concatenated
					}</pre>
<p>I hope that this will prove useful&#8230;</p>
<p>Yours sincerely</p>
<p>Werner</p>
]]></content:encoded>
	</item>
</channel>
</rss>
