|
-
May 25th, 2005, 05:36 AM
#1
Thread Starter
Fanatic Member
HTML/CSS/JavaScript: Hide a textfield
Okay, in FireFox (browser supreme) it not only allows me to make the textfield invisible but also reduce the height to 0px so that there is no white space and everthing shifts up accordingly.
However, IE (devil spawn) will simply not allow this. It hides the field but there is still space where it is! So, in my case where I want to hide 20 fields on a form there is instead a mass of white space that looks extremely messy
Any ideas on how to reduce the height of a textfield in IE to 0 pixels??
 Life is one big rock tune 
-
May 25th, 2005, 06:29 AM
#2
Re: HTML/CSS/JavaScript: Hide a textfield
Have you tried changing the style of the textbox to display:none
-
May 25th, 2005, 07:26 AM
#3
Re: HTML/CSS/JavaScript: Hide a textfield
 Originally Posted by DeadEyes
Have you tried changing the style of the textbox to display:none
Yes, that would be the best idea 
Code:
<script type="">
<!--
var MyTextbox = document.getElementById("Textbox ID Goes Here");
MyTextbox.style.display = "none";
//-->
</script>
And to show it you would just do this:
Code:
MyTextbox.style.display = "inline";
Cheers,
RyanJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|