I am looking for a good way to hide a text area. I have hidden it in IE using CSS, but that doesn't work for Netscape. Does anyone have any ideas.
| SitePoint Sponsor |

I am looking for a good way to hide a text area. I have hidden it in IE using CSS, but that doesn't work for Netscape. Does anyone have any ideas.





stupid question, but why would you need to hide a text area? Are you doing it for a "show/hide" layers thing?
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes

I need to post a long html string and the comments inside the string break the hidden field. So basically if it isn't in a textarea it just puts that html on the page.





ok...a few options would be:
1) Make that particular string of text the same color as the background.
2) With comment tags, you will be safe just leaving it out on the page. No need for an input tag.
3) Put the comment tags outside the <textare> tag itself.
Of course, there could be something else you are trying to accomplish and if that is the case then just tell me to shut the hell up...
![]()
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes

Well, I need to post the html string, so it has to be in a form element. I have tried css, works in ie not nn. The only other thing I can think of doing is using HTMLEncode(), this is an asp project, on the string, but I keep getting type mismatch errors.


So you're trying to post a form and send a value that contains html code, yes?
The hidden form field shouldn't be breaking on the comments...the problem is likely with other characters such as quotes or < >. You could run your string through a JavaScript that replaces all instances of special characters with their character code. So... " gets replaced with ".
There are a few thousand scripts out there that accomplish this. Personally, I'd avoid messing around with a hidden textarea.


Oops...
" would get replaced with it's character code, which is
# & 34;

that is the crux of the problem. This is an asp script that I am trying to build. So I would like to use a VBScript function called HTMLEncode() that does what you are talking about. Only I keep getting mismatch errors when I try it. But, that is a post for another forum.
Thanks for your help
Thanks Creole
Would hiding the textarea by dropping a layer on top of it work for you?
Andy
www.avaronweb.com

I did use a layer and it worked. But, the page is an asp page and the content changes a little depending on conditions. But I think it will work if I make it big enough. Also, I guess something has to be in the layer or it doesn't work. Like a table cell. Is this the case? This is a good site, I got a lot of help from you folks.
Thanks
I will try and return the favor if I can





this page might be your solution.
http://www.hut.fi/~ajkoivun/demos/magiclayer_basic.html
There is a function in here called "hide()"
It works in Netscape.
You could do
<body onLoad="hide()">
and it would hide the layer with the form in it.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
Bookmarks