Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How to create html input boxes (with descriptive text)?
Old 08-09-2006, 01:22 PM How to create html input boxes (with descriptive text)?
Novice Talker

Posts: 10
Trades: 0
Hi,

Would someone please tell me how to create simple html input boxes containing text directions that would disapear with click (to enter text)?

You know...in drop boxes you can give a little description of what a user should do on the very first choice like "Please select a car," and sometimes in certain websites, on their search boxes, there would be a text "search" inside the box that disappears upon user's click to enter text for the search. What's the html code for that?

Thank you.
serenathy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-09-2006, 01:29 PM Re: How to create html input boxes (with descriptive text)?
Mad182's Avatar
Skilled Talker

Posts: 54
Name: Madars
Location: Latvia
Trades: 0
HTML Code:
<input type="text" name="name" value="blahblahblah" />
__________________
There's no place like 127.0.0.1

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Mad182 is offline
Reply With Quote
View Public Profile Visit Mad182's homepage!
 
Old 08-10-2006, 07:33 AM Re: How to create html input boxes (with descriptive text)?
Novice Talker

Posts: 10
Trades: 0
I know that already. It's something extra.
serenathy is offline
Reply With Quote
View Public Profile
 
Old 08-10-2006, 10:09 AM Re: How to create html input boxes (with descriptive text)?
Ultra Talker

Posts: 256
Location: Auckland, New Zealand
Trades: 0
HTML Code:
<input type="text" value="Enter something" onfocus="this.value = (this.value == 'Enter something') ? '' : this.value;" onblur="this.value = (this.value == '') ? 'Enter something' : this.value;" />
Probably best to seperate the javascript and put them in functions, but I think this is what you're asking for.

Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
Reply With Quote
View Public Profile Visit mastercomputers's homepage!
 
Old 08-10-2006, 01:39 PM Re: How to create html input boxes (with descriptive text)?
Novice Talker

Posts: 10
Trades: 0
Quote:
Originally Posted by mastercomputers View Post
HTML Code:
<input type="text" value="Enter something" onfocus="this.value = (this.value == 'Enter something') ? '' : this.value;" onblur="this.value = (this.value == '') ? 'Enter something' : this.value;" />
Probably best to seperate the javascript and put them in functions, but I think this is what you're asking for.

Cheers,

MC
Thank you mastercomputers. That's exactly what i'm looking for.
serenathy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to create html input boxes (with descriptive text)?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.20710 seconds with 12 queries