Jump to content

Recommended Posts

Posted

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

Posted

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 ?

Posted

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".

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...