View Single Post
Old 11-12-2007, 09:14 PM   #5 (permalink)
CMellor
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

Weird, it just wasn't working with the inline event handler, so I used an Event.observer

Code:
Event.observe('post_comment', 'submit', function() {
	comment.post();
});
and it worked, but that lead to another error *sigh*

I have it so if the textarea is left blank upon submit, it will show an error and do nothing more, I'm using Spry, which has it's own method's of doing things. It's simply:

Code:
if(Spry.Widget.Form.validate(this.form) == true) {
  alert('Test');
}
If the textarea wasn't blank, then the alert would appear. What I'm getting is, when I submit the blank form, I get the alert and then the error message... it didn't do this in the normal function, but it's doing it in the class, which is weird.
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote