Armageddonz
New Member
I have a javascript character counter that I use inside of a text area. It works great in normal html, but when I put the exact same code inside of a text area inside php, nothing. Here it is in html when it works fine:\[code\]<div id="counter"> <span id="counter_airway" style="font-size:11px; color:#666666;">140 Character Limit</span></div><div id="grapvine_text"><form name="CommentBox" method="post" action="Profile.php?id=<?php echo $prof->id; ?>"> <textarea name='airway' class='round_10px' onkeyup="limit_length(this,140,'counter_airway');"></textarea></form>\[/code\]Here it is implemented inside my php form:\[code\]<div id="commentBoxBlog"> <form name="CommentBox" method="post" action="Profile.php?id=<?php echo $prof->id; ?>"> <?php if($auth->id == $prof->id) { echo "<div id='counter'> <span id='counter_airway' style='font-size:11px; color:#666666;'>140 Character Limit</span> </div><textarea name='airway' class='round_10px' onkeyup='limit_length(this,140,'counter_airway');'></textarea> <input type='submit' name='commentProfileSubmit' value='http://stackoverflow.com/questions/2103987/Exhale' class='post'/>"; } elseif(!$auth) { echo "<textarea name='ProfileComment' class='round_10px' disabled>Please sign in to comment...</textarea>"; } elseif($auth->id != $prof->id) { echo "<textarea name='ProfileComment' class='round_10px'></textarea> <input type='submit' name='commentProfileSubmit' value='http://stackoverflow.com/questions/2103987/Exhale' class='post' />"; } ?> </form></div></div>\[/code\]