Afternoon guys, i am scratching my head at the moment and cannot work
out how the following code is not working



Event.observe(window,'load',function() {
        $('js').value=1;
// loop through required

$('myform').observe('submit',function(event) {
        $$('.req').each(function(e) {

                        if($(e).value=='') {
                                alert('Value Required');
        event.stop(event); // doesnt stop the request from firing

return; // still doesnt return out of the loop - and doesnt matter if
i return or not, it doesnt stop the request from firing
}

});

        $('myform').request({
                parameters:
                                                        {
                                                                isJs: 
$('js').value
                                                        },
                onComplete: function(transport)
                                                        {
                                                                
$('myUpdateElement').update(transport.responseText);
                                                        }
                });
        event.stop(event);

        }); // observer form submit
}); // Event.Observe End

I really cannot see what i have done wrong here .. normally this works
fine !!

Thanks In Advance

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