Hi there,
This may or may not be a dumb question, but I've never come across it before.
Can you point to a javascript 'onsubmit="return validation()"' on a form, but WITHIN PHP tags?
Such as the below.
function validation(){
var reply = document.getElementById('comreply');
var div = document.getElementById('errormsg');
if((reply.value == '') || (reply.value == ' ')){
div.innerHTML = "Please type a reply";
reply.focus();
return false;}
else{
return true;}
}
<? echo "<form name=\"reply\" method=\"post\" action=\"replydone.php\" onsubmit=\"return validation()\"><textarea name=\"comreply\" id=\"comreply\" cols=\"25\" rows=\"4\"></textarea></form> ?>
Thanks for all replies.