Hey all,

I've recently started messing around with Prototype again, so I
thought I'd start small and write 5 lines of code that would check if
all fields in a form are filled out. So I thought

document.observe('dom:loaded', function() {
        $('submNewUser').disable();
        new Form.Observer($('newUser'), 0.3, function(e, val) {
                if(!$F('newUsername').blank() && !$F('email').blank() && 
$F('pword')
== $F('checkPassword')) {
                        $('submNewUser').enable();
                }
        });
});

would do the trick. But this throws an error:
element has no properties
var method = element.tagName.toLowerCase();

I'm guessing it has something to do with the fact that I'm checking
the value of an empty field, but I thought you had to use the blank
function for it... So is this a bug or am I missing something stupid?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to