How do you make default text in the text field?
-
I want text to appear in the text field by default, like to say "Put your description here" but then when you click on it, it disappears. Similar to when asking a question on yahoo answers, it says "What would you like to ask" and then when you click there to type, it goes away? (i'm using ruby on rails if that's needed) ThANKS
-
Answer:
Hello, Basically to make the text appear by default it is: <input type='text' value='Your Default Value' name='fieldname' id='fieldid' /> And you have to use javascript to remove the text. Before he </head> section add the following script <script language='javascript'> function removedefault() { var elm = document.getelementbyid('fieldid'); elm.value = ""; } </script> And rewrite the input box as: <input type='text' value='Your Default Value' name='fieldname' id='fieldid' onclick="removedefault();" /> That should do the trick.
curtdbz at Yahoo! Answers Visit the source
Related Q & A:
- How do I make Yahoo my default email on Windows XP?Best solution by Yahoo! Answers
- How do I make a text box on Myspace?Best solution by Yahoo! Answers
- How do I make Opera my default browser?Best solution by Super User
- How do you make transparent text on gimp?Best solution by Yahoo! Answers
- How do I change the default text and color in Yahoo mail?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.