[jQuery] Re: Clear Input Search Box?

2007-10-02 Thread Leandro Vieira Pinho
How about it: http://leandrovieira.com/archive/jquery-resetdefaultvalue-plugin On Oct 1, 9:38 am, Danjojo [EMAIL PROTECTED] wrote: I am trying to clear an input search box's value. When the page loads the value is set. I.e.: input id=searchBox name=searchBox type=text class=input

[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Karl Swedberg
Hi there, try using .focus() instead: $(#searchBox).focus(function() { $(this).attr(value,); }); Hopefully that'll get you want you want. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Oct 1, 2007, at 8:38 AM, Danjojo

[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Danjojo
Thank you! IE 7 throws an error something about not supporting an object.. FireFox is happy and FireBug does not display an error. Now if someone were to type in a search word.. then focus away for whatever reason.. then click back in, the search box would clear again.. Firebug also at that

[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Kevin Scholl
http://jquery.com/plugins/project/toggleval On Oct 1, 8:38 am, Danjojo [EMAIL PROTECTED] wrote: I am trying to clear an input search box's value. When the page loads the value is set. I.e.: input id=searchBox name=searchBox type=text class=input style=width: 100px; value=Search term or

[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Karl Swedberg
On Oct 1, 2007, at 9:36 AM, Danjojo wrote: Thank you! IE 7 throws an error something about not supporting an object.. FireFox is happy and FireBug does not display an error. It might work better to use .val('') instead of .attr('value','') Now if someone were to type in a search

[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Guy Fraser
Danjojo wrote: I am trying to clear an input search box's value. If you are just wanting to display a prompt inside the search box, eg. search text, that will dissapear when the box receives focus, use the overlabel plugin...

[jQuery] Re: Clear Input Search Box?

2007-10-01 Thread Guy Fraser
Kevin Scholl wrote: http://jquery.com/plugins/project/toggleval http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/