The error is that you get the form fields when the image is clicked, so, the fields not completed.
But you must get the fields when the button is clicked.
Try this:
Code:
<script type="text/javascript">
$(document).ready (function () {
$('#form').hide();
$('#imageclick img').click(function () {
$('#form').slideToggle('slow');
$('.fullname').focus();
$('.sendmessage').click(function () {
var fullname = $('.fullname').val();
var emailaddress= $('.emailfield').val();
var comments = $('.messagetext').val();
if ((fullname =='') || (emailaddress =='') || (comments =='')){
alert ("Please, all fields are required, make sure you have not missed any of them, thank you!");
return false;
} else if
((fullname.length < 20) || (comments.length < 20)) {
alert ("A minimum of 20 chracters must be entered in both the name and message fields to send the message!");
return false;
} else {
return true;
}
});
});
});
</script>