Jump to content

Query: how to create log in text box?


valiantshady

Recommended Posts

Greetings,Hey everyone, I've had a query about how to create a form text box with some value inside that gets automatically cleared as the user clicks on it to edit it, more like this example on www.bodybuilding.com they have a sign in form at the right hand-side next to the flash slide show.. Sorry if my question is not that professional but I can't seem to know how from their source code.. Thanks for your time and effort.. :good:

post-36527-0-01047600-1332986075_thumb.jpg

Link to comment
Share on other sites

In the <input> onfocus attribute, you use javascript pass a command to the browser to empty the input, when user click (focus) on it with a mouse and the default value is there.EX:

<input type="text" value="Enter name" onfocus="if(this.value=='Enter name'){this.value=''}">

Link to comment
Share on other sites

Oh my god, eTianbun and dsonesuk you're the best, I really didn't have any idea how to do that..Thanks a lot my friends i am really thankful! :good: :Happy:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...