I use the below to disable my submit image when it is clicked to prevent double clicking:
<input class="real" name="freshness" value="" type="text" size="5" maxlength="6"/><a href="javascript:void(0)" onClick="submitComment('+[id]+'); this.onclick=null; return false;"><img class="submitcommentimg" id="submitcommentimg<?php echo $id; ?>" src="/images/check.png" alt="Comment!" border="0"></a>
<a href="javascript:void(0)" onClick="submitComment('+[id]+'); this.onclick=null; return false;">
How would I re-enable this when my form returns a validation error?