not really a php question
but how can i change a textfield when it receives user focus
<input TYPE ="TEXT" WIDTH="35PX" class="whatever" name="focText">
focText.onFocus setVal="You put focus here"
type thing?
intput text onFocus
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
check out jQuery and the focus() and val() methods
http://jquery.com
http://www.visualjquery.com/1.1.1.html
http://jquery.com
http://www.visualjquery.com/1.1.1.html
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
I'm not completely sure though this might be what you're looking for...
Code: Select all
<label class="search" for="query_string" title="Search our website.">Search Site</label><input class="query" id="query_string" maxlength="50" name="query_string" onfocus="javascript:if(this.value=='Search...') {this.value='';}" onblur="javascript:if(this.value=='') {this.value='Search...'}" size="9" tabindex="1" type="text" value="Search..." />