After some searching, it looks like I re-implemented the following: http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
Mine does have the global functions to hide and remove the watermarks. I think I like the idea of making the text be driven from the title attribute. I'm also curious about this technique of placing a label over the textbox instead of placing the text inside of the textbox. It would make things a little cleaner. I'll investigate that along with the fixed watermark suggested above. Josh On 6/1/07, Alex Ezell <[EMAIL PROTECTED]> wrote: > > > I use a "plugin" called hint.js to do this. Not sure where I got it > and the original source is on another machine so I can't look it up. > > It works by catching all the inputs with a particular CSS class and > setting their values to the HTML title attribute's value. > > It's a similar idea but slightly different. The code is here: > http://strtest.alexezell.com/js/hint.js > > and the usage would be something like: > <input type="text" size="40" value="" title="City, State, Zip" > name="fromLocation" id="fromLocation" class="blur" /> > > Just another option in case it gives you any ideas. > > /alex > > On 6/1/07, Josh Bush <[EMAIL PROTECTED]> wrote: > > That's a cool idea. Would you want the watermark in this instance to be > on > > top of the input as you described (and possibly a different color), or > > actually inside of the input box and included in the text when you get > the > > value? > > > > Josh > > > > > > On 6/1/07, Glen Lipka <[EMAIL PROTECTED]> wrote: > > > I love it. I think I will switch to this one rather than the one I > was > > using. > > > Previously, I had heard this technique being called > "OverLabel". However, > > I think Watermark is a much better name. > > > > > > One feature request: > > > Often I have an input that the user should type in their URL or > sometimes > > its a dollar figure or percentage. > > > The way I currently do this is I make a span with the words "http://" > or > > "$" or "%" in it, then I position it absolutely over the input and > increase > > the left or right padding of the input so you don't write over it. > > Basically, I am creating a persistent "Watermark" to help the user know > NOT > > to put in that part. So they enter 4.05 instead of $4.05. > > > > > > It seems like this is a natural fit with the watermark plugin, even > though > > it does something a little differently under the covers. > > > $( "#first").Watermark("http://", "fixed" ); //or something > > > What do you think? > > > > > > Glen > > > > > > > > > > > > On 6/1/07, Josh Bush < [EMAIL PROTECTED]> wrote: > > > > > > > > I haven't had a chance to test any of my plugins with v1.1.3. I'll > be > > > > looking into it soon. Thanks for the response! > > > > > > > > On Jun 1, 9:28 am, Rey Bango <[EMAIL PROTECTED] > wrote: > > > > > Looks great in IE7 and FF 2.0.0.4 Josh. Great work. This is a very > > > > > useful plugin. > > > > > > > > > > Have you tested it with jQuery v1.1.3 as well? > > > > > > > > > > Rey... > > > > > > > > > > > > > > > > > > > > Josh Bush wrote: > > > > > > Stupid last minute changes. I fixed my goof. Please see if > that > > > > > > corrects the problem. > > > > > > > > > > > On Jun 1, 8:45 am, "Dan G. Switzer, II" < > [EMAIL PROTECTED]> > > > > > > wrote: > > > > > >> Josh, > > > > > > > > > > >>> It's been a long time since I've posted anything. I've been > busy, > > but > > > > > >>> I did manage to squeeze out another plugin before my vacation. > > > > > >>> I'm proud to announce the first Beta of my <a href="http:// > > > > > >>> > > digitalbush.com/projects/watermark-input-plugin">Watermark > > Input > > > > > >>> Plugin for jQuery</a>. This is the first public release for > this > > > > > >>> plugin which has been used in a few of my other projects. > > > > > >>> Please let me know if you have any troubles. I welcome your > > feedback. > > > > > >> I'm getting errors in both IE6 and FF2: > > > > > > > > > > >> settings is not > > > definedhttp://www.digitalbush.com/files/jquery/watermarkinput/beta1/jquery.w... > > > > > >> kinput.js > > > > > >> Line 60 > > > > > >> if(input.val()==settings.text ) > > > > > > > > > > >> -Dan > > > > > > > > > > -- > > > > > BrightLight Development, LLC. > > > > > 954-775-1111 (o) > > > > > 954-600-2726 (c) > > > > > [EMAIL PROTECTED]://www.iambright.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >