KingOrmon Posted March 19, 2012 Posted March 19, 2012 Hi, Sencha controls has a PlaceHolder property that allow me set a default text what a edit is empty. How can I modify it ? Regards Quote
KingOrmon Posted March 19, 2012 Author Posted March 19, 2012 I would like to know if I can set a background image for emulate apple search field. Quote
zilav Posted March 19, 2012 Posted March 19, 2012 Sencha controls has a PlaceHolder property that allow me set a default text what a edit is empty. PlaceHolder and default text are different things. I checked uniedit in FireBug but couldn't find PlaceHolder property. Oh well, doesn't matter really, we have a good old DOM... function OnAfterrender(sender) { if ('placeholder' in sender.el.dom) sender.el.dom.placeholder = 'test'; } Add to UniEdit's ClientEvents.ExtEvents Quote
KingOrmon Posted March 19, 2012 Author Posted March 19, 2012 Thank you Zilav, It works correctly under firefox, safari but not in IE. maybe, is better use a background image for emule a search text field. What is the correct way for do it ? Quote
zilav Posted March 19, 2012 Posted March 19, 2012 Placeholder property is an HTML5 thing, so you'll need some custom scripting to make it work in IE. For example placeholder.js My advise - just forget IE. 1-2 years from now IE will be autoupdated almost everywhere (unless on XP) to support HTML5. Even if it is not working now, placeholder is not an essential feature you can't live without. It's nice, but not "a must". Quote
KingOrmon Posted March 19, 2012 Author Posted March 19, 2012 thank you zilav, for set a background image in a UniEdit ? See image attached of desired result. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.