![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Oct 2009
Posts: 2
OS: win98 sp2
|
Hide Text onClick
Hello everyone, the new guy here. Thought I would see if you all could help.
I am trying to add an onClick event to hide the default text value of my text field. Here is my code without an onClick. <form method='post' action='{SITE_ROOT}index.php' style='margin:0px'> <input class="ibox_search" type='text' name='search' value='Search All' style='width:300'> <input class="ibox_search_submit" type='submit' value='{WORD_SEARCH}'> </form> Any help would be appreciated. Thanks |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,884
OS: Vista, various linux distros
|
Re: Hide Text onClick
Oh right, just to clarify you want it to hide "Search All" when the input box is clicked? If i'm right in assuming that:
Code:
<input class="ibox_search" type='text' name='search' value='Search All' style='width:300' onfocus="this.value=='Search All'?this.value='':this.value=this.value;" onblur="this.value==''?this.value='Search All':this.value=this.value;"> Cheers, Jamey p.s. Welcome to tsf =] |
|
|
|
![]() |
| Thread Tools | |
|
|