Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help with textarea formatting issues

 
Sam Walker
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I�m having some strange problems with textarea tags. I find it almost impossible to enforce a consistent look across browsers for textarea even though I specifically impose a style.
<textarea class="simpleText" name=exhibit_text wrap="physical" cols="60" rows="12" value="<%= exhibit %>"

cols="60" works fine for IE but NS 6 showed the columns huge so I specifically made the columns 30 when dealing with NS6. Now I�m testing with NS 7 and all the columns are pitifully small. Is there a way to enforce column width without coding for every browser and every version?

A second problem is that some blank spaces are inserted in the textarea. Even when I initialize the content of a textarea with my data, a chunk of blank spaces gets appended to the end. How can I remedy this? I am already using a JavaScript to remove blanks from the beginning of a textarea, do I need to do the same for the end?
And the wrap doesn�t work. I expected wrap=�physical� would actually would insert a newline in a long line and send it the server that way. That does not appear to happen in my testing. When I access the line again from the server and display it in a paragraph the line appears as one long line.

I�ve been looking everywhere for information how to deal with these, all I find is the basic elementary stuff.
Your help is greatly appreciated
[ June 12, 2003: Message edited by: Sam Walker ]
[ June 12, 2003: Message edited by: Sam Walker ]
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,
Actually text area doesnt have a attribute "value"
so remove that and check.u have to write
<%= exhibit %> after text area tag.
I cheked in ns 6 and didnt find any probs i eman
ie and ns 6 and 7 behaved the same way
Then regarding the spaces in ur js include a fn cut the trailing space also i mean fn for both trailing and leading.
I had a js like that somewhere in my pc. if u having probs i will check
 
Sam Walker
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunitha,
Thanks for the suggestions. I do need to clean up my scripts including what you suggested. My experience has been that even when there�s nothing to initialize the value attribute the column sizes are different on different browsers. I�m going to check out to see what happens after value is removed.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The wrap attribute is not part of the HTML 4 standard and so browsers apply their own meanings to it, if they support it at all.
To enforce a standard width, you might want to try applying a CSS width attribute that specifies the width in pixels rather than "columns" (whose width, as you have discovered, is up to browser interpretation).
hth,
bear
 
Sam Walker
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I then remove the col attribute from textarea tags or use it together with CSS width?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Blow it away.
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic