I'm using Wicket to develop flexible, i18n-ed webapps where HTML and JS are second class citizens. At first your JS looks more compact, but on long term is a dead end.
Stefan --- On Tue, 4/27/10, Robert Kimotho <[email protected]> wrote: > From: Robert Kimotho <[email protected]> > Subject: Re: Shadow text on input fields > To: [email protected] > Date: Tuesday, April 27, 2010, 11:19 AM > have you tried:- > > <input type="text" name="" size="" value=" your > text..." > onFocus="this.value=''" onMouseOver="window.status=' your > txt...';return true" onMouseOut="window.status='';return > true"> > > Kimotho, > > On 4/26/10, Stefan Jozsa <[email protected]> > wrote: > > CSS: > > .inputHint { > > color: #888866; > > } > > > > Java: > > add(new AttributeModifier("value", true, new > AbstractReadOnlyModel<String>() > > { > > @Override > > public String getObject() { > > return > "yourHintText"; > > } > > })); > > add(new AttributeModifier("class", true, new > AbstractReadOnlyModel<String>() > > { > > @Override > > public String getObject() { > > return > "inputHint"; > > } > > })); > > add(new AttributeModifier("onfocus", true, new > > AbstractReadOnlyModel<String>() { > > @Override > > public String getObject() { > > return > "removeInputHint(this,'inputHint');"; > > } > > })); > > > > JS: > > removeInputHint = function(x, c) { > > x.setAttribute('value', ''); > > jQuery(x).removeClass(c); > > } > > > > Stefan > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
