Solved

Remove text on focus change in form?

Posted on 2013-06-24
2
290 Views
Last Modified: 2013-07-09
Form
I want the Keywords and Location text to disappear when a Visitor clicks in the respective field.

What's the conventional approach?
0
Comment
Question by:sandshakimi
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39272228
How do you applying this text? if you are using html5 tags and used placeholder then it will be disappear when you click on like:

<input type="text" name="Keywords" id="Keywords" placeholder="Keywords" />

Open in new window

Otherwise you can use a simple javascript to Manage like:
<input type="text"  onblur="if(this.value=='')this.value='Keywords';" onfocus="if(this.value=='Keywords')this.value='';" value="Keywords" id="Keywords" name="Keywords">

Open in new window

0
 

Expert Comment

by:Junshiro
ID: 39283969
you may want to use script that using the
<script ...>
Codes here
</script>

instead of using in-line script :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now