Forum Moderators: open

Message Too Old, No Replies

Can I hide a textarea?

How do I hide a text area?

         

codebreaker

9:13 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



I am using a textarea to hold some data. I have an SSI pass the data from a file on the server. I am manipulating the text with javascript, and everything is working fine.

But since the textarea is just holding data for me, I would like it to be invisible, or at least off screen somewhere. How can I do this?

Or, is there a better way to hold multi-line data from a file using javascript? SSI and javascript are the only tools I have available.

I have tried:

<textarea id="in" rows="1" cols="1" style="database">

...and then in the css (found this on the web somewhere):

textarea.database {
position: absolute;
left: -2000px;
visibility: hidden;
}

but this doesn't do anything to the textarea. Any suggestions?

PhraSEOlogy

9:26 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



Change:

<textarea id="in" rows="1" cols="1" style="database">

to:

<textarea id="in" rows="1" cols="1" class="database">

css:

.database {
visibility: hidden;
}

DrDoc

9:31 pm on Jun 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld!

Try this:

<textarea id="in" rows="1" cols="1" class="database">

textarea.database {
left: 0;
top: 0;
}

Then, if you need to toggle visibility, toggle

position
between
absolute
and
relative
, and
visibility
between
visible
and
hidden
.

If you don't need to toggle the visibility, but instead want the textarea to always be hidden, simply add

position: absolute;
and
visiblity: hidden;
to the style sheet.

codebreaker

9:51 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



Worked great! Thanks!