Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-29-2007, 02:36 AM   PM User | #1
iceflyin
Regular Coder

 
Join Date: Jul 2007
Posts: 135
Thanks: 1
Thanked 0 Times in 0 Posts
iceflyin is an unknown quantity at this point
Creating example disappearing input text.

How do you create text for a search field that disappears when a user clicks it? Like... Have the text "eg. Home Remodel", then user click the field and it disappears...

Javascript is the only way?
iceflyin is offline   Reply With Quote
Old 09-29-2007, 03:24 AM   PM User | #2
Antoniohawk
Senior Coder

 
Join Date: Aug 2002
Location: Kansas City, Kansas
Posts: 1,518
Thanks: 0
Thanked 2 Times in 2 Posts
Antoniohawk will become famous soon enough
I'd say that Javascript is the only way to go on this one. Try something like this.

Code:
<input value="default_value" onfocus="if (this.value == 'default_value') this.value = '';" />
Antoniohawk is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:25 PM.


Advertisement
Log in to turn off these ads.