<?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: Visible text &#8220;Password&#8221; instead of &#8220;********&#8221; in the password field</title>
	<atom:link href="http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/feed" rel="self" type="application/rss+xml" />
	<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html</link>
	<description>Useful Tutorials, Scripts , Tips, and Resources for all PHP and Ajax beginners and experts .</description>
	<lastBuildDate>Wed, 10 Mar 2010 10:59:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mahesh</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-5132</link>
		<dc:creator>Mahesh</dc:creator>
		<pubDate>Fri, 05 Feb 2010 09:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-5132</guid>
		<description>HTML Goes Here
&lt;input type=&quot;text&quot; id=&quot;Username&quot; value=&quot;User Name&quot; /&gt;
&lt;input type=&quot;text&quot; onfocus=&quot;setBoxToPasswordmode(this)&quot; onblur=&quot;resetBox(this)&quot; id=&quot;fname&quot; value=&quot;Password&quot; /&gt;</description>
		<content:encoded><![CDATA[<p>HTML Goes Here<br />
&lt;input type=&#8221;text&#8221; id=&#8221;Username&#8221; value=&#8221;User Name&#8221; /&gt;<br />
&lt;input type=&#8221;text&#8221; onfocus=&#8221;setBoxToPasswordmode(this)&#8221; onblur=&#8221;resetBox(this)&#8221; id=&#8221;fname&#8221; value=&#8221;Password&#8221; /&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-5131</link>
		<dc:creator>Mahesh</dc:creator>
		<pubDate>Fri, 05 Feb 2010 09:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-5131</guid>
		<description>Idea is good.... but i think we can do it in a better way!

HTML



Script


    
    function setBoxToPasswordmode(box) {
        if (box.value == box.defaultValue) {
            box.type = &quot;password&quot;;
            box.value = &quot;&quot;;
        }
    }

    function resetBox(box) {
        if (box.value == &quot;&quot;) {
            box.type = &quot;text&quot;;
            box.value = box.defaultValue;
        } 
    }
        
</description>
		<content:encoded><![CDATA[<p>Idea is good&#8230;. but i think we can do it in a better way!</p>
<p>HTML</p>
<p>Script</p>
<p>    function setBoxToPasswordmode(box) {<br />
        if (box.value == box.defaultValue) {<br />
            box.type = &#8220;password&#8221;;<br />
            box.value = &#8220;&#8221;;<br />
        }<br />
    }</p>
<p>    function resetBox(box) {<br />
        if (box.value == &#8220;&#8221;) {<br />
            box.type = &#8220;text&#8221;;<br />
            box.value = box.defaultValue;<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patembe</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-5040</link>
		<dc:creator>patembe</dc:creator>
		<pubDate>Thu, 14 Jan 2010 08:16:53 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-5040</guid>
		<description>Thank you very much for the nice trick.. :D
It&#039;s really usefull for me..</description>
		<content:encoded><![CDATA[<p>Thank you very much for the nice trick.. <img src='http://roshanbh.com.np/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
It&#8217;s really usefull for me..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pligg.com</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-4950</link>
		<dc:creator>pligg.com</dc:creator>
		<pubDate>Thu, 17 Dec 2009 21:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-4950</guid>
		<description>&lt;strong&gt;Show Visible text &quot;Password&quot; in the password field...&lt;/strong&gt;

As you know, the user login box of the website contains the following fields username and password. Furthermore, most of them put the &quot;Username&quot; inside user name field and &quot;********&quot; inside password field to save the space within designing.In this ...</description>
		<content:encoded><![CDATA[<p><strong>Show Visible text &#8220;Password&#8221; in the password field&#8230;</strong></p>
<p>As you know, the user login box of the website contains the following fields username and password. Furthermore, most of them put the &#8220;Username&#8221; inside user name field and &#8220;********&#8221; inside password field to save the space within designing.In this &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: poorna</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-4284</link>
		<dc:creator>poorna</dc:creator>
		<pubDate>Tue, 28 Jul 2009 18:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-4284</guid>
		<description>Isnt working for me. My password field dissappears on clicking! any idea?</description>
		<content:encoded><![CDATA[<p>Isnt working for me. My password field dissappears on clicking! any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trevor</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-3628</link>
		<dc:creator>trevor</dc:creator>
		<pubDate>Fri, 06 Mar 2009 22:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-3628</guid>
		<description>this is great! exactly what I need

Thanks!</description>
		<content:encoded><![CDATA[<p>this is great! exactly what I need</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nanhe</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-3557</link>
		<dc:creator>nanhe</dc:creator>
		<pubDate>Mon, 16 Feb 2009 07:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-3557</guid>
		<description>hi
your article is good but how can show password in login field like
face book
fust upon show password when we click then show ********************
thanks</description>
		<content:encoded><![CDATA[<p>hi<br />
your article is good but how can show password in login field like<br />
face book<br />
fust upon show password when we click then show ********************<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DRA</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-3154</link>
		<dc:creator>DRA</dc:creator>
		<pubDate>Mon, 17 Nov 2008 12:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-3154</guid>
		<description>Hi Roshan,

Just a quick note. This does not work on IE. Any reason / idea why ?</description>
		<content:encoded><![CDATA[<p>Hi Roshan,</p>
<p>Just a quick note. This does not work on IE. Any reason / idea why ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gevorg Ablabutyan</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-2257</link>
		<dc:creator>Gevorg Ablabutyan</dc:creator>
		<pubDate>Mon, 08 Sep 2008 19:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-2257</guid>
		<description>Here is my solution:


	function changeToPassword(){
		document.login.password.type = &quot;password&quot;;
		document.login.password.value = &quot;&quot;
	}


I call this on both the onSelect and onClick events so that when the user tabs to the field, the script does its thing too.</description>
		<content:encoded><![CDATA[<p>Here is my solution:</p>
<p>	function changeToPassword(){<br />
		document.login.password.type = &#8220;password&#8221;;<br />
		document.login.password.value = &#8220;&#8221;<br />
	}</p>
<p>I call this on both the onSelect and onClick events so that when the user tabs to the field, the script does its thing too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scott</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-1956</link>
		<dc:creator>scott</dc:creator>
		<pubDate>Wed, 20 Aug 2008 06:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-1956</guid>
		<description>just what I was lookin&#039; for! Thanks.</description>
		<content:encoded><![CDATA[<p>just what I was lookin&#8217; for! Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phillip</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-1255</link>
		<dc:creator>Phillip</dc:creator>
		<pubDate>Sun, 22 Jun 2008 01:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-1255</guid>
		<description>Your solution was helpful, but I had some usability issues... It is better to specify ...style.display=&#039;inline&#039; instead of ...style.display=&#039;&#039;

Also, you can do this all without the surrounding divs.  I&#039;ve made  a working demo and posted it here:  http://pastie.org/219689

In this example, I made something similar for an email field.

After digging around online for other solutions, I saw one where someone did something like: document.getElementById(&#039;inputId&#039;).type = &quot;password&quot; or &quot;text&quot;

that seemed to work well, but was a bit too sketchy for my taste, as I was worried about the potential for submitting old passwords.

cheers,
Phillip</description>
		<content:encoded><![CDATA[<p>Your solution was helpful, but I had some usability issues&#8230; It is better to specify &#8230;style.display=&#8217;inline&#8217; instead of &#8230;style.display=&#8221;</p>
<p>Also, you can do this all without the surrounding divs.  I&#8217;ve made  a working demo and posted it here:  <a href="http://pastie.org/219689" rel="nofollow">http://pastie.org/219689</a></p>
<p>In this example, I made something similar for an email field.</p>
<p>After digging around online for other solutions, I saw one where someone did something like: document.getElementById(&#8216;inputId&#8217;).type = &#8220;password&#8221; or &#8220;text&#8221;</p>
<p>that seemed to work well, but was a bit too sketchy for my taste, as I was worried about the potential for submitting old passwords.</p>
<p>cheers,<br />
Phillip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-544</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Sat, 29 Mar 2008 06:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-544</guid>
		<description>@mike 
Thanks a lot for appreciation...hope to server same kinda tutorials in future...

@Spacebat
Even ajax doesn&#039;t work when javaScript is turned off.Furthermore, in your code you can use the posted value of actual password field to do so..and you can login man...if you can&#039;t login do tell me..I&#039;ll can make you login through this kinda system..</description>
		<content:encoded><![CDATA[<p>@mike<br />
Thanks a lot for appreciation&#8230;hope to server same kinda tutorials in future&#8230;</p>
<p>@Spacebat<br />
Even ajax doesn&#8217;t work when javaScript is turned off.Furthermore, in your code you can use the posted value of actual password field to do so..and you can login man&#8230;if you can&#8217;t login do tell me..I&#8217;ll can make you login through this kinda system..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spacebat</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-536</link>
		<dc:creator>Spacebat</dc:creator>
		<pubDate>Sat, 29 Mar 2008 02:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-536</guid>
		<description>This doesn&#039;t degrade gracefully when javascript is turned off. Indeed, it makes it impossible to login because the password field isn&#039;t made available.

Ideally the source of the form would look as it does normally and javascript would insert a text input next to the password one in the DOM, toggle the visibility and add the event handlers for the purposes you describe here.

You&#039;ve made a good start though...</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t degrade gracefully when javascript is turned off. Indeed, it makes it impossible to login because the password field isn&#8217;t made available.</p>
<p>Ideally the source of the form would look as it does normally and javascript would insert a text input next to the password one in the DOM, toggle the visibility and add the event handlers for the purposes you describe here.</p>
<p>You&#8217;ve made a good start though&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Desjardins</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-534</link>
		<dc:creator>Mike Desjardins</dc:creator>
		<pubDate>Fri, 28 Mar 2008 19:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-534</guid>
		<description>Very cool tutorial... glad to see how this is done.  

Truth be told, I&#039;ve always kinda disliked it when people put &quot;username&quot; and &quot;password&quot; in the input fields instead of labeling the fields separately... I feel like it doesn&#039;t adequately cue the user when the context is placed *inside* the text field.

But I&#039;m glad to see how to do it if I ever find the need!</description>
		<content:encoded><![CDATA[<p>Very cool tutorial&#8230; glad to see how this is done.  </p>
<p>Truth be told, I&#8217;ve always kinda disliked it when people put &#8220;username&#8221; and &#8220;password&#8221; in the input fields instead of labeling the fields separately&#8230; I feel like it doesn&#8217;t adequately cue the user when the context is placed *inside* the text field.</p>
<p>But I&#8217;m glad to see how to do it if I ever find the need!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html/comment-page-1#comment-533</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Fri, 28 Mar 2008 18:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/show-text-in-the-password-field.html#comment-533</guid>
		<description>thanks ketan..and for that 5 line of code I thought it&#039;s better not to use jquery..</description>
		<content:encoded><![CDATA[<p>thanks ketan..and for that 5 line of code I thought it&#8217;s better not to use jquery..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
