See if this would help you. It's based on the classic A List Apart  
article, but just written now off the top of my head:

<div id="outer">
        <form action="" method="get" accept-charset="utf-8">
                <p><label for="name">Name</label><input type="text" name="name" 
 
value="" id="name" /></p>
                <p><label for="password">Password</label><input type="password" 
 
name="password" value="" id="password" /></p>
                <p><label for="shoe_size">Shoe Size</label><input type="text"  
name="shoe_size" value="" id="shoe_size" /></p>
                <p><input type="submit" value="Continue &rarr;" /> <input  
type="reset" name="some_name" value="Reset" id="some_name" /></p>
        </form>
</div>
<script type="text/javascript" charset="utf-8">
        $$('input').each(function(elm){
                if(label = elm.up('p').down('label')){
                        var label = $(label);
                        label.setStyle({zIndex: 
2,position:'absolute',top:'3px',left:'3px',color:'#666'});
                        elm.observe('focus',function(evt){label.hide()});
                        elm.observe('blur',function(evt){if(!elm.present()) 
label.show()});
                }
        });
</script>

Walter

On Mar 2, 2009, at 7:16 AM, Quleczka wrote:

> Still is really messy, I don't have time right now to make it nicer :)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to