470,831 Members | 1,668 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,831 developers. It's quick & easy.

textarea adds unwanted spaces

Expand|Select|Wrap|Line Numbers
  1. <TEXTAREA NAME="comments" ROWS="10" COLS="50">
  2.         <?php  echo $comments; ?>
  3. </TEXTAREA>
  5. this is a very simple question. the textarea above automatically adds three tab spaces at the beginning. as a result, when i try to check it using javascript
  7.  if(theform.comments.value == "")
  8.      {
  9.            //some code here
  10.      }
it never becomes null even if no input has been made. i know this is a very simple question but i can't really figure out what's wrong.

Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that. - moderator
Mar 2 '08 #1
2 3198
1,584 Expert 1GB
try this:
<TEXTAREA NAME="comments" ROWS="10" COLS="50"><?php echo $comments; ?></TEXTAREA>

no spaces between <textarea></textarea>
Mar 2 '08 #2
try this:
<TEXTAREA NAME="comments" ROWS="10" COLS="50"><?php echo $comments; ?></TEXTAREA>

no spaces between <textarea></textarea>
hi, i figured this out too a while a go. it turned out the i coded the ff:
<?php echo $comments; ?>

so, that explained the spaces. thanks for the reply
Mar 2 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Gadrin77 | last post: by
15 posts views Thread by Jeff North | last post: by
5 posts views Thread by Jesper Rřnn-Jensen | last post: by
4 posts views Thread by rukkie | last post: by
10 posts views Thread by Adrian Smith | last post: by
7 posts views Thread by Totti | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.