View Full Version : TextArea To Appear as Input type="text"
KrazyKid
02-24-2003, 06:33 PM
I want to use a TextArea To Appear as Input type="text"
in other words a single line input box that does not have any scrolling and is only one row that only accepts 50 characters....
Ideas or tips greatly appreciated...
x_goose_x
02-24-2003, 06:49 PM
Sorry, but I don't see the point to this. Why not just make it a text input?
KrazyKid
02-24-2003, 07:06 PM
I only want to allow the users to enter in 50 characters without the scroll arrows in IE 5.5 SP2
Using a textbox would be ideal however; when I dynamically place a value in the field using ASP the value becomes terminated by quotes in the variable that is populating them.
This error is not an issue with a text area but the display is not ideal based on table data/aesthetics.
Thanks to all that post!
Roy Sinclair
02-24-2003, 07:23 PM
Could you explain this a bit more:
Using a textbox would be ideal however; when I dynamically place a value in the field using ASP the value becomes terminated by quotes in the variable that is populating them.
I'm not sure what you're trying to say there but I strongly suspect there's a way to handle it so I'd like to have a better idea of the exact problem.
KrazyKid
02-24-2003, 07:52 PM
I was able to elimate the problem by using this method:
<input type="textarea" name="txt1" size="50" maxlength = "50" value='<% =Server.HTMLEncode(str1) %>' ></textarea>
it appears to work just fine..for the intended purpose.
I would still like to know how to make a single line "textarea" form input without scrollers that is not type "textbox" using CSS.
Thanks for all the ponderings!!
Roy Sinclair
02-24-2003, 08:41 PM
You can make a textarea with rows="1" but it's still going to have the scroller and allow multiline input. It's the nature of the tag, that's what it's supposed to do.
KrazyKid
02-24-2003, 08:43 PM
Thanks again Roy, but what about syntax like
class="border: none;overflow: hidden;"
I have read that this eliminates the scoller; but I have not seen it work is it browser specific??!?!
Roy Sinclair
02-24-2003, 08:47 PM
The overflow: hidden removes the scroller but doesn't stop multi line input.
AgaBoogaBoo
02-24-2003, 10:50 PM
I'm not to much into this stuff, but would using a layer or a table help in this case?
cg9com
02-25-2003, 05:40 AM
i would guess along with the hidden overflow, nowrap would keep it on one line.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.