You can do this quite easily in prototype...

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

<input type="text" class="access" title="Type something here..." />

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" <[email protected]>
To: "Prototype & script.aculo.us" <[email protected]>
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to