Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cursor and display

Status
Not open for further replies.

lenelene

Programmer
Dec 10, 2002
57
0
0
MY
i want display text "hello" when a user put the cursor in the input text box,..how to write the coding?when the cursor not in the text box..the text will not appear
 

use the title attribute to specify the text to display as a 'tooltip'

<input type="text" name="textfield" title="hello">
 
i want to displlay the text outside the textbox when the cursor is inside the textbox. my purpose is that when somebody put the cursor in the textbox for Subject, it will display text "Bold button cannot be used
 
put your text box in a span then change the html onClick of the text box..like this
Code:
<span id='theOne'><input type='text' onClick='document.getElementById("theOne").innerHTML = "TEXT YOU WANT GOES HERE" + document.getElementById("theOne").innerHTML'></span>

hope that helps

"Whether you think that you can, or that you can't, you are usually right." - Henry Ford
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top