Closed GoogleCodeExporter closed 8 years ago
I am an idiot i did not set this as an enchancement :(
Original comment by dog...@gmail.com
on 23 Jun 2011 at 12:54
Thanks for the feedback.
I was thinking of maybe adding an option called "textAttr" that would accept a
string name of an attribute, the value of which you want to automatically turn
into watermark text.
So, if options.textAttr is set to "placeholder", whatever value is in the
placeholder attribute would become the watermark text when .watermark() is
called on the element. (Or if native watermarks are supported, nothing would
happen to the element.)
Doing it this way would also allow people to use other attributes, such as
title, for the watermark text.
Original comment by t...@speednet.biz
on 21 Jul 2011 at 10:52
well? :)
Original comment by marekda...@gmail.com
on 20 Mar 2013 at 12:14
Hello,
first of all, great js library. It does everything I need it to do. I found
several others that would do only partially what I needed, but this one does it
all.
I added the new code to your script library that dog...@gmail.com posted as I
am setting the placeholder attribute on my fields. Hope you don't mind.
Also, I'd like to post this solution on my XPages blog for other Lotus Notes /
XPages developers out there, so, I was wondering if you'd mind me doing that?
Of course I would give you and dog...@gmail.com proper credit.
Thank you and have a nice day.
Daniel
Original comment by t.d.frie...@gmail.com
on 15 Aug 2014 at 8:38
Sorry for the massive delay. I got a time slice and made some changes to
support setting watermarks via attribute values. The changes are a bit more
extensive than the 3 lines of code suggested, since that is not really bullet
proof, and it also supports leaving off the empty string argument and just
passing the options object.
I'll try to get the new version posted within a day.
Original comment by t...@speednet.biz
on 15 Aug 2014 at 10:28
This issue is fixed in the latest release (3.2.0). I would strongly recommend
using the latest release rather than the 3-line quick fix above, as the
quick-fix above may introduce other problems.
The fix adds a new option called "textAttr", which allows you to specify any
attribute from which to generate the watermarks. The Project Home page
includes a description and instructions for implementing in your pages.
Original comment by t...@speednet.biz
on 16 Aug 2014 at 4:52
Hello,
this is perfect! Thank you very much for putting that into your code, I do
appreciate it.
It works perfectly, no issues whatsoever.
Great work, well done!!
Original comment by t.d.frie...@gmail.com
on 25 Aug 2014 at 10:14
Original issue reported on code.google.com by
dog...@gmail.com
on 23 Jun 2011 at 12:54Attachments: