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 point throws: c[j].apply is not a function e(Object type=click target=input#searchBox.input)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(c<a?'':e(parseInt(c/a)))+((c=c%a... On Oct 1, 9:23 am, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi there, try using .focus() instead: > > $("#searchBox").focus(function() { > $(this).attr("value",""); > }); > > Hopefully that'll get you want you want. > > --Karl > _________________ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Oct 1, 2007, at 8:38 AM, Danjojo 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 part #"> > > > I want to set it to blank when the user clicks the box to enter a > > value: > > > $("#searchBox").click(function() { > > $("#searchBox").attr("value",""); > > }); > > > I have tried a couple things but I keep getting errors.. > > > $("#searchBox").click(function() { > > $(this).attr("value",""); > > });- Hide quoted text - > > - Show quoted text -