<?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: Clear Text On Input Field On Click</title>
	<atom:link href="http://www.erummunir.com/240/clear-text-on-input-field-on-click/feed" rel="self" type="application/rss+xml" />
	<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click</link>
	<description></description>
	<lastBuildDate>Wed, 14 Apr 2010 07:02:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cyryl</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-13786</link>
		<dc:creator>Cyryl</dc:creator>
		<pubDate>Thu, 15 Oct 2009 04:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-13786</guid>
		<description>I think I know what you&#039;re asking here. I&#039;m used to using the Javascript. Not explaining... So I&#039;ll try... Hope it helps you.

1.) &quot;function clearMe(formfield)&quot;

This is the function that is defined in the script. (&quot;function&quot; is a general or common variable used in Javascript. It can refer to anything you want it to as long as you define it.) In this case, &quot;clearMe&quot; is referring to a FORM or input.

2.) &quot;if (formfield.defaultValue==formfield.value)
formfield.value = “”&quot;

&quot;if&quot; is a boolean term used to say, &quot;If this is the current state of&quot;. Then you define the state that something must be in to activate the function called upon. So basically this says, &quot;IF the FORMFIELD&#039;s DEFAULTVALUE is equal to NOTHING, then do THIS.&quot; you can basically tell the script to activate itself when the contents of your formfield equal what you are defining in the formfield,value=&quot;VALUEHERE&quot; part.

3.) –input type=”text” name=”&quot; size=”xx” value=”xx” onfocus=”clearMe(this)”&gt;

This is where you are putting your INPUT form field. It is a TEXT input field whose NAME is whatever you want it to be... The size of the field (in width of characters) is defined after that. The DEFAULT VALUE (what you want in the field when you first see it...) is defined in &quot;VALUE&quot;.

&quot;onFocus&quot; basically means &quot;when you click this with your mouse&quot; or &#039;bring this field into focus&#039; as it were...

&quot;clearMe(this)&quot; is the defined action for &quot;onFocus&quot;. This action refers back to the defined function in the Javascript above, you&#039;ll notice. By calling &quot;clearMe&quot; when the box is empty, the form is then calling upon the script and the defined action inside of it.

So what this means is that when you bring click the box to bring it into focus, the defined action is that the script will clear the box.

Wow I sure I hope I made SOME sense in all of this. I&#039;m tired and was actually just about to go to bed. :P

I hope that helps. :)

Cyryl</description>
		<content:encoded><![CDATA[<p>I think I know what you&#8217;re asking here. I&#8217;m used to using the Javascript. Not explaining&#8230; So I&#8217;ll try&#8230; Hope it helps you.</p>
<p>1.) &#8220;function clearMe(formfield)&#8221;</p>
<p>This is the function that is defined in the script. (&#8221;function&#8221; is a general or common variable used in Javascript. It can refer to anything you want it to as long as you define it.) In this case, &#8220;clearMe&#8221; is referring to a FORM or input.</p>
<p>2.) &#8220;if (formfield.defaultValue==formfield.value)<br />
formfield.value = “”&#8221;</p>
<p>&#8220;if&#8221; is a boolean term used to say, &#8220;If this is the current state of&#8221;. Then you define the state that something must be in to activate the function called upon. So basically this says, &#8220;IF the FORMFIELD&#8217;s DEFAULTVALUE is equal to NOTHING, then do THIS.&#8221; you can basically tell the script to activate itself when the contents of your formfield equal what you are defining in the formfield,value=&#8221;VALUEHERE&#8221; part.</p>
<p>3.) –input type=”text” name=”&#8221; size=”xx” value=”xx” onfocus=”clearMe(this)”&gt;</p>
<p>This is where you are putting your INPUT form field. It is a TEXT input field whose NAME is whatever you want it to be&#8230; The size of the field (in width of characters) is defined after that. The DEFAULT VALUE (what you want in the field when you first see it&#8230;) is defined in &#8220;VALUE&#8221;.</p>
<p>&#8220;onFocus&#8221; basically means &#8220;when you click this with your mouse&#8221; or &#8216;bring this field into focus&#8217; as it were&#8230;</p>
<p>&#8220;clearMe(this)&#8221; is the defined action for &#8220;onFocus&#8221;. This action refers back to the defined function in the Javascript above, you&#8217;ll notice. By calling &#8220;clearMe&#8221; when the box is empty, the form is then calling upon the script and the defined action inside of it.</p>
<p>So what this means is that when you bring click the box to bring it into focus, the defined action is that the script will clear the box.</p>
<p>Wow I sure I hope I made SOME sense in all of this. I&#8217;m tired and was actually just about to go to bed. <img src='http://www.erummunir.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>I hope that helps. <img src='http://www.erummunir.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cyryl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mack@Las Vegas Real Estate</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-12842</link>
		<dc:creator>Mack@Las Vegas Real Estate</dc:creator>
		<pubDate>Tue, 22 Sep 2009 11:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-12842</guid>
		<description>Cyryl I never thought making those text box with auto clear text feature would be so easy as a copy paste. Your tips are very instructive and easily understandable for no techie like me.. Unfortunately can you throw some light on the javascript you have used it the comments?

Regards,
Mack McMillan</description>
		<content:encoded><![CDATA[<p>Cyryl I never thought making those text box with auto clear text feature would be so easy as a copy paste. Your tips are very instructive and easily understandable for no techie like me.. Unfortunately can you throw some light on the javascript you have used it the comments?</p>
<p>Regards,<br />
Mack McMillan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erum Munir</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-11365</link>
		<dc:creator>Erum Munir</dc:creator>
		<pubDate>Fri, 21 Aug 2009 04:57:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-11365</guid>
		<description>Thanks! I&#039;ll check it out!</description>
		<content:encoded><![CDATA[<p>Thanks! I&#8217;ll check it out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyryl</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-11014</link>
		<dc:creator>Cyryl</dc:creator>
		<pubDate>Fri, 14 Aug 2009 21:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-11014</guid>
		<description>Here we go.  I resolved the issue. This is a bit more practical than the code above is - if you&#039;re editing a text field then coming back to it later:

--head--

--script type=&quot;text/javascript&quot;&gt;
 function clearMe(formfield){
  if (formfield.defaultValue==formfield.value)
   formfield.value = &quot;&quot;
 }
--/script-- 

--/head--

--body--

--input type=&quot;text&quot; name=&quot;&quot; size=&quot;xx&quot; value=&quot;xx&quot; onfocus=&quot;clearMe(this)&quot;&gt;

--/body--</description>
		<content:encoded><![CDATA[<p>Here we go.  I resolved the issue. This is a bit more practical than the code above is &#8211; if you&#8217;re editing a text field then coming back to it later:</p>
<p>&#8211;head&#8211;</p>
<p>&#8211;script type=&#8221;text/javascript&#8221;&gt;<br />
 function clearMe(formfield){<br />
  if (formfield.defaultValue==formfield.value)<br />
   formfield.value = &#8220;&#8221;<br />
 }<br />
&#8211;/script&#8211; </p>
<p>&#8211;/head&#8211;</p>
<p>&#8211;body&#8211;</p>
<p>&#8211;input type=&#8221;text&#8221; name=&#8221;" size=&#8221;xx&#8221; value=&#8221;xx&#8221; onfocus=&#8221;clearMe(this)&#8221;&gt;</p>
<p>&#8211;/body&#8211;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyryl</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-10974</link>
		<dc:creator>Cyryl</dc:creator>
		<pubDate>Thu, 13 Aug 2009 22:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-10974</guid>
		<description>...But what if you want to go and edit or add to the text box later on?

This code is set to clear the field each time you click the field. If you use TAB or ALT+TAB to navigate back to the field, it just highlights the text... You can then press END to go to the end of the text and continue typing or use your arrow keys to go to what you want to edit...

But most people will use their mouse to go back into the field. How do we prevent the field from clearing itself onClick after it&#039;s been edited once before?</description>
		<content:encoded><![CDATA[<p>&#8230;But what if you want to go and edit or add to the text box later on?</p>
<p>This code is set to clear the field each time you click the field. If you use TAB or ALT+TAB to navigate back to the field, it just highlights the text&#8230; You can then press END to go to the end of the text and continue typing or use your arrow keys to go to what you want to edit&#8230;</p>
<p>But most people will use their mouse to go back into the field. How do we prevent the field from clearing itself onClick after it&#8217;s been edited once before?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abbey@homecoming dress</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-8851</link>
		<dc:creator>Abbey@homecoming dress</dc:creator>
		<pubDate>Mon, 06 Jul 2009 18:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-8851</guid>
		<description>That is great. I usually face problems with my blog comments as visitors do not see this sign “YourName@YourKeywords” and post their comments with weird names, making my blog look awful. Now, I’ll save a lot of time which I spend for moderation.</description>
		<content:encoded><![CDATA[<p>That is great. I usually face problems with my blog comments as visitors do not see this sign “YourName@YourKeywords” and post their comments with weird names, making my blog look awful. Now, I’ll save a lot of time which I spend for moderation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taylor@Adobe Flex Classes</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-2406</link>
		<dc:creator>Taylor@Adobe Flex Classes</dc:creator>
		<pubDate>Wed, 19 Nov 2008 19:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-2406</guid>
		<description>That is a very good breakdown of how to input text on an input field.  I will add this to my website right away.</description>
		<content:encoded><![CDATA[<p>That is a very good breakdown of how to input text on an input field.  I will add this to my website right away.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger Hamiltone</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-1210</link>
		<dc:creator>Roger Hamiltone</dc:creator>
		<pubDate>Fri, 03 Oct 2008 16:20:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-1210</guid>
		<description>Great post. Thanks for sharing the code.</description>
		<content:encoded><![CDATA[<p>Great post. Thanks for sharing the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krystine</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click/comment-page-1#comment-719</link>
		<dc:creator>Krystine</dc:creator>
		<pubDate>Mon, 15 Sep 2008 15:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.erummunir.com/?p=240#comment-719</guid>
		<description>Thanks for the post. Really liked the idea will include this in my website. :)</description>
		<content:encoded><![CDATA[<p>Thanks for the post. Really liked the idea will include this in my website. <img src='http://www.erummunir.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
