Ok Im trying to use the below code on my site to stop users from clicking my submit button 100 times real fast and posting 100 items at once, this code works on other sites but not mine, after a lot of playing around I found the problem to be because in my header I have to use
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
or else a lot of areas of my site don't look corretly in different browsers. if I use
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> then the code below seems to work, is there a way to make it work with my loose doctype?
<SCRIPT language="Javascript1.2">
function disb() {
document.all.form1.friendcommentpost.disabled = true;
}
</SCRIPT>
<form method="post" name="form1" action="submitnewmember.php?unid=1" onsubmit='disb();'>
<textarea cols="40" rows="5" name="comment"></textarea>
<input type="hidden" name="friendid" value="2">
<input type="hidden" name="url" value="index.php?action=friendcomment&type=member&userid=2&unid=1">
<input type="submit" name="friendcommentpost" value="Post Comment">
</form>