<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Checking availability of user name with AJAX</title>
	<atom:link href="http://www.aleixcortadellas.com/main/2009/03/05/465/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aleixcortadellas.com/main/2009/03/05/465/</link>
	<description>A little bit of everything...</description>
	<lastBuildDate>Sat, 13 Feb 2010 06:52:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aleix</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-271</link>
		<dc:creator>Aleix</dc:creator>
		<pubDate>Sun, 19 Apr 2009 06:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-271</guid>
		<description>Fixed, thanks for pointing it out.</description>
		<content:encoded><![CDATA[<p>Fixed, thanks for pointing it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PIERO</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-270</link>
		<dc:creator>PIERO</dc:creator>
		<pubDate>Sat, 18 Apr 2009 23:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-270</guid>
		<description>You need to change the &quot;check.jpg&quot; picture ..URL.


..</description>
		<content:encoded><![CDATA[<p>You need to change the &#8220;check.jpg&#8221; picture ..URL.</p>
<p>..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnny</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-254</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Tue, 14 Apr 2009 13:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-254</guid>
		<description>Yeah I realize that not everyone has JavaScript enabled in their browsers so I have both client side and server side validation. I think having any requirements that visitors must have to sign up will cause them to get annoyed so I try to create as much of a convenience I can for the visitor.

Thanks again man you really helped me out.</description>
		<content:encoded><![CDATA[<p>Yeah I realize that not everyone has JavaScript enabled in their browsers so I have both client side and server side validation. I think having any requirements that visitors must have to sign up will cause them to get annoyed so I try to create as much of a convenience I can for the visitor.</p>
<p>Thanks again man you really helped me out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleix</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-251</link>
		<dc:creator>Aleix</dc:creator>
		<pubDate>Tue, 14 Apr 2009 05:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-251</guid>
		<description>Hello Johnny,

I&#039;ve checked your implementation, works nice! Just a quick tip: like a number of other users, I use NoScript Firefox plugin, which blocks JavaScript, and therefore unless I allow JS on the page, the username checker doesn&#039;t work on default. To fix this you have the option to require JS; here you&#039;ll find some ways to do so http://www.webproworld.com/discussion-forum/66271-how-do-i-require-javascript-active-scripting.html (namely, visitors may only register to your site if they have JS enabled).

About the donation: I thank you for your good intentions. I&#039;ve implemented a donation button through PayPal at the sidebar for your convenience.

Regards
</description>
		<content:encoded><![CDATA[<p>Hello Johnny,</p>
<p>I&#8217;ve checked your implementation, works nice! Just a quick tip: like a number of other users, I use NoScript Firefox plugin, which blocks JavaScript, and therefore unless I allow JS on the page, the username checker doesn&#8217;t work on default. To fix this you have the option to require JS; here you&#8217;ll find some ways to do so <a href="http://www.webproworld.com/discussion-forum/66271-how-do-i-require-javascript-active-scripting.html" rel="nofollow">http://www.webproworld.com/discussion-forum/66271-how-do-i-require-javascript-active-scripting.html</a> (namely, visitors may only register to your site if they have JS enabled).</p>
<p>About the donation: I thank you for your good intentions. I&#8217;ve implemented a donation button through PayPal at the sidebar for your convenience.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnny</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-250</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Mon, 13 Apr 2009 23:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-250</guid>
		<description>Hey Aleix just wanted to say that I really appreciate you helping me out with that code snippet it worked great and saved me many hours of doing it on my own. I had a little trouble adding the text output via javascript but I finally got it and finished it.

You can check out the username availability function with the added text box color in the link below. The unavailable username is johnny.

http://www.sharperjafs.com/Account/Sign_Up.php

Is there anyway that I can donate some money to you because I would really like to show you thanks.</description>
		<content:encoded><![CDATA[<p>Hey Aleix just wanted to say that I really appreciate you helping me out with that code snippet it worked great and saved me many hours of doing it on my own. I had a little trouble adding the text output via javascript but I finally got it and finished it.</p>
<p>You can check out the username availability function with the added text box color in the link below. The unavailable username is johnny.</p>
<p><a href="http://www.sharperjafs.com/Account/Sign_Up.php" rel="nofollow">http://www.sharperjafs.com/Account/Sign_Up.php</a></p>
<p>Is there anyway that I can donate some money to you because I would really like to show you thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleix</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-247</link>
		<dc:creator>Aleix</dc:creator>
		<pubDate>Mon, 13 Apr 2009 06:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-247</guid>
		<description>Hello,

Glad you will use it in your site! To change the input text box background color is luckily not complicated at all, as JS allows to dynamically change styles of DOM elements. Read more about it here: http://www.w3schools.com/Css/pr_background-color.asp

Here are the steps you need to take to get it to work:

in check.php

1. Replace line 20
    for &lt;strong&gt;echo &#039;0&#039;;&lt;/strong&gt;

2. Replace line 25
    for &lt;strong&gt;echo &#039;1&#039;;&lt;/strong&gt;

What this does is return a number instead of an image, depending on the result of the username availability check. 0 means submitted name is unavailable, while 1 means the opposite.

in index.php

3. Remove &lt;strong&gt;document.getElementById(divid).innerHTML = html;&lt;/strong&gt;

4. After &lt;strong&gt;var html = http.responseText;&lt;/strong&gt;
    add &lt;strong&gt;    if (html == 0) { 
    document.getElementById(&#039;username&#039;).style.backgroundColor=&quot;#ff2c2c&quot;;
    } else {
    document.getElementById(&#039;username&#039;).style.backgroundColor=&quot;#ffffff&quot;;
    }&lt;/strong&gt;

Step 3 is to prevent the response number being showed to the user, as we only want to use it for telling JS whether to change colour or not. Step 4 is the snippet of code which actually changes the colour. You may replace the value with colour name, hex or RGB value.

If I forgot nothing, that should be all you need :)

Regards</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Glad you will use it in your site! To change the input text box background color is luckily not complicated at all, as JS allows to dynamically change styles of DOM elements. Read more about it here: <a href="http://www.w3schools.com/Css/pr_background-color.asp" rel="nofollow">http://www.w3schools.com/Css/pr_background-color.asp</a></p>
<p>Here are the steps you need to take to get it to work:</p>
<p>in check.php</p>
<p>1. Replace line 20<br />
    for <strong>echo &#8216;0&#8242;;</strong></p>
<p>2. Replace line 25<br />
    for <strong>echo &#8216;1&#8242;;</strong></p>
<p>What this does is return a number instead of an image, depending on the result of the username availability check. 0 means submitted name is unavailable, while 1 means the opposite.</p>
<p>in index.php</p>
<p>3. Remove <strong>document.getElementById(divid).innerHTML = html;</strong></p>
<p>4. After <strong>var html = http.responseText;</strong><br />
    add <strong>    if (html == 0) {<br />
    document.getElementById(&#8217;username&#8217;).style.backgroundColor=&#8221;#ff2c2c&#8221;;<br />
    } else {<br />
    document.getElementById(&#8217;username&#8217;).style.backgroundColor=&#8221;#ffffff&#8221;;<br />
    }</strong></p>
<p>Step 3 is to prevent the response number being showed to the user, as we only want to use it for telling JS whether to change colour or not. Step 4 is the snippet of code which actually changes the colour. You may replace the value with colour name, hex or RGB value.</p>
<p>If I forgot nothing, that should be all you need <img src='http://www.aleixcortadellas.com/main/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnny</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-246</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Sun, 12 Apr 2009 22:45:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-246</guid>
		<description>Great tutorial I will be implementing this into my website.

I am wondering how would you add text box color such as green for success and red for an error?

Thank you</description>
		<content:encoded><![CDATA[<p>Great tutorial I will be implementing this into my website.</p>
<p>I am wondering how would you add text box color such as green for success and red for an error?</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleix</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-198</link>
		<dc:creator>Aleix</dc:creator>
		<pubDate>Thu, 02 Apr 2009 11:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-198</guid>
		<description>In index.html:

1. Replace the input field code with this:

&lt;*input id=&quot;username&quot; type=&quot;text&quot; name=&quot;username&quot; size=&quot;20&quot; style=&quot;display: inline;&quot;/&gt;

remove *

2. Add the availability check link anywhere in the page:

&lt;*a href=&quot;javascript:void(0);&quot; onclick=&quot;timeoutUsernameCheck()&quot;&gt;Check&lt;*/a&gt;

remove *

This will stop making automatic checks and will only perform them when user clicks on link. 

3. Change delay to 0, replacing the existing var delay = &#039;1000&#039;; with:

var delay = &#039;0000&#039;;


That&#039;s the quickest and easiest way, and works. 
You may want to do further tweaks in the AJAX code to optimise it...


Regards</description>
		<content:encoded><![CDATA[<p>In index.html:</p>
<p>1. Replace the input field code with this:</p>
<p>< *input id="username" type="text" name="username" size="20" style="display: inline;"/></p>
<p>remove *</p>
<p>2. Add the availability check link anywhere in the page:</p>
<p>< *a href="javascript:void(0);" onclick="timeoutUsernameCheck()">Check< */a></p>
<p>remove *</p>
<p>This will stop making automatic checks and will only perform them when user clicks on link. </p>
<p>3. Change delay to 0, replacing the existing var delay = &#8216;1000&#8242;; with:</p>
<p>var delay = &#8216;0000&#8242;;</p>
<p>That&#8217;s the quickest and easiest way, and works.<br />
You may want to do further tweaks in the AJAX code to optimise it&#8230;</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nagaraja</title>
		<link>http://www.aleixcortadellas.com/main/2009/03/05/465/comment-page-1/#comment-197</link>
		<dc:creator>nagaraja</dc:creator>
		<pubDate>Thu, 02 Apr 2009 10:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.aleixcortadellas.com/main/?p=465#comment-197</guid>
		<description>thanks for script .

pla suggest me how to give link to the check availability instead of on key up click.

very urgent</description>
		<content:encoded><![CDATA[<p>thanks for script .</p>
<p>pla suggest me how to give link to the check availability instead of on key up click.</p>
<p>very urgent</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.452 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-10-27 15:27:32 -->

