09-24-2007, 10:52 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
|
Are Operators Valid?
Hey,
Quick question. My site currently has 4 invalid HTML errors. It's all down to this function:
Code:
// Error checking
$('send_pm').onsubmit = function() {
valid = $(this.to).present() && $(this.subject).present() && $(this.message).present();
if(valid) {
return true;
}
else {
alert('Please fill in all fields');
}
return false;
}
The validator is saying that the && operator is the cause of the error. Their's 4 errors, and 4 &'s.
I'm guessing it's my code, perhaps it's not wrote out correctly, though it does work. Does anybody have any suggestions? BTW: I'm using PrototypeJS
Cheers,
- Chris.
__________________
Not quite a n00b...
|
|
|
|