[Proto-Scripty] Re: Example values input text

2009-08-07 Thread DJ Mangus

I don't know of a plugin like that but shouldn't be too hard to port

On 8/7/09, spielberg  wrote:
>
> Hello to the people of the group. It´s my first question. Any one know
> abut something like this http://mucur.name/system/jquery_example/ to
> prototype?? I need to use the element title of the text input. Thanks
> for all;
>
> Spielberg
>
> >
>

-- 
Sent from my mobile device

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Example values input text

2009-08-07 Thread Alex McAuley

You can do this quite easily in prototype...

for input type="text" just use the title attribute



Event.observe(window,'load',function() {

$$('.access').invoke('observe','focus',function(element) {

if(element.value==element.defaultValue) {
element.value='';
}
});
$$('.access').invoke('observe','blur',function(element) {

if(element.value!=element.defaultValue || element.value=='') {
element.value=element.defaultValue;
}
});
});


(untested but should work no problems)

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: "spielberg" 
To: "Prototype & script.aculo.us" 
Sent: Friday, August 07, 2009 12:04 PM
Subject: [Proto-Scripty] Example values input text



Hello to the people of the group. It´s my first question. Any one know
abut something like this http://mucur.name/system/jquery_example/ to
prototype?? I need to use the element title of the text input. Thanks
for all;

Spielberg




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---