Hy everyone,

I have the following script :

if (Object.isUndefined(Axent)) { var Axent = { } }
Axent.SelfLabeledInput = Class.create({
        initialize: function() {
                var labelSelector = arguments[0] || 'label';
                $$(labelSelector).findAll(function(l) {return
(l.readAttribute
('for') !== null)}).each(function(l){
                    l.hide();
                        $(l.readAttribute('for'))._value =
l.innerHTML;
                        if ($(l.readAttribute('for')).value.empty())
{
                $(l.readAttribute('for')).value = $(l.readAttribute
('for'))._value
            }
                        $(l.readAttribute('for')).observe
('blur',function(e){if
(Event.element(e).value == '') Event.element(e).value = Event.element
(e)._value;});
                        $(l.readAttribute('for')).observe
('focus',function(e){if
(Event.element(e).value == Event.element(e)._value) Event.element
(e).value = '';});
                });
        }

});

I want to write a function from this script that when i press the
submit on a form, if an input is focused, it hides/clears it, so it
doesn`t get submitted to the database. Work with the latest Prototype
lib. I don`t know any javascripting so, I need your help !!
--~--~---------~--~----~------------~-------~--~----~
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