Hello everyone, I'm trying to select same "id" for more than one input. My code works with 1 input, but when I add 2 textareas or more my code stops working... Here's my code: *Javascript* *<script> function validateComment() { var value = $("[id=commentbox]").val(); var word = value.toLowerCase(); // make sure this word is lowercase if( document.myForma.commentbox.value == "" ) { document.getElementById('comment-error').innerHTML = '<style> #error-comment-info_empty {display:block !important; }</style>'; return false; } if (word.indexOf("bad-word") != -1) { document.getElementById('comment-error').innerHTML = '<style> #error-comment-info {display:block !important; }</style>'; return false;} if (word.indexOf("bad-word") != -1) { document.getElementById('comment-error').innerHTML = '<style> #error-comment-info {display:block !important; }</style>'; return false;} if (word.indexOf("bad-word") …

Member Avatar
Member Avatar
+0 forum 9

The End.