i use the jquery plugin autofill for that
http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
<script type="text/javascript" src="{{=URL
(request.application,'static','jquery.autofill.js')}}"></script>
<script type="text/javascript"><!--
$(document).ready(function(){
$('#txtSearch').autofill({
value: '...search',
defaultTextColor:
'#ccc',
activeTextColor: '#aaa'
});
});
//--></script>
{{=FORM(INPUT(_name='q',_size=10,_id="txtSearch"),_action=URL
(request.application,'default','search'),_method='get')}}
On Dec 21, 2:09 pm, weheh <[email protected]> wrote:
> I have a textarea with some welcoming text already in it, but I'd like
> a javascript to clear the text with when the user sets focus on the
> textarea. The textarea and the rest of my form, of which textarea is a
> part, are created using a custom form that also uses widgets to
> display the form fields. I think I need a custom widget to do what I
> want. I've read the doc but just can't seem to make it work for me.
> I'd appreciate it if someone could show me how to do it. Thx.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.