473,668 Members | 2,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visibility of form elements

Can I make a <textarea> and an <input type="checkbox" > invisible?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Jul 23 '05 #1
11 9273
In article <co**********@c hessie.cirr.com >,
Christopher Benson-Manica <at***@nospam.c yberspace.org> wrote:
Can I make a <textarea> and an <input type="checkbox" > invisible?


Use JavaScript and CSS to hide them or JavaScript to remove them from
the DOM tree.

--
Kris
<kr*******@xs4a ll.netherlands> (nl)
Jul 23 '05 #2
Christopher Benson-Manica <at***@nospam.c yberspace.org> writes:
Can I make a <textarea> and an <input type="checkbox" > invisible?


If they're invisible, aren't they functionally equivalent to
type="hidden"?

--

http://ourdoings.com/ Let your digital photos organize themselves.
Sign up today for a 7-day free trial.
Jul 23 '05 #3
Bruce Lewis wrote:
Christopher Benson-Manica writes:
Can I make a <textarea> and an <input type="checkbox" > invisible?


If they're invisible, aren't they functionally equivalent to
type="hidden"?


There is no <input type="hidden"> in HTML, at least not that I can find.

http://www.w3.org/TR/html401/interact/forms.html#h-17.4

Perhaps you mean that "display: none" is the same as
"visability=hid den"? In that case, no. Display: none removes the
element, inline or block box and all, from the display.
Visability=hidd en makes the box invisible, but the box still takes up
space in the layout.

--
Brian (remove "invalid" to email me)
Jul 23 '05 #4

"Brian" <us*****@juliet remblay.com.inv alid> wrote in message
news:L8******** **************@ bgtnsc04-news.ops.worldn et.att.net...
Bruce Lewis wrote:
Christopher Benson-Manica writes:
Can I make a <textarea> and an <input type="checkbox" > invisible?


If they're invisible, aren't they functionally equivalent to
type="hidden"?


There is no <input type="hidden"> in HTML, at least not that I can find.

http://www.w3.org/TR/html401/interact/forms.html#h-17.4


On that page, "hidden" is indeed one of the options on the line that reads

type =
text|password|c heckbox|radio|s ubmit|reset|fil e|hidden|image| button

I'd be shocked and deeply upset if it were ever to be dropped!

Jul 23 '05 #5

"Bruce Lewis" <br*****@yahoo. com> wrote in message
news:nm******** *****@departmen t-of-alchemy.mit.edu ...
Christopher Benson-Manica <at***@nospam.c yberspace.org> writes:
Can I make a <textarea> and an <input type="checkbox" > invisible?


If they're invisible, aren't they functionally equivalent to
type="hidden"?


Important differences:

1. If a textarea or checkbox is set invisible using styles, their visibility
can be changed dynamically in client-side code.

2. On the other hand, if a textarea or checkbox is set invisible using
styles, then they'll be visible to anyone not using the author's stylesheet.

I use type="hidden" for data I need to pass through a form without the
user's involvement. If the data is a large block of text that would be
displayed in a textarea, then change each double quote inside the text to
&quot; and use the result as the value of the VALUE attribute of the hidden
INPUT.

<input type="hidden" name="textarean ame"
value="double-quote-encoded-data">

If a checkbox would be checked IF it were displayed, then use

<input type="hidden" name="checkboxn ame" value="xyz">

where "xyz" is the VALUE that the checkbox would have. If the checkbox would
be unchecked, then either don't write anything out at all, or write

<input type="hidden" name="checkboxn ame" value="">

depending on the exigencies of the server-side form process and platform.
Using ASP and ordinary Response variables, either way would work fine.

Jul 23 '05 #6
Harlan Messinger wrote:
"Brian" wrote...
There is no <input type="hidden"> in HTML

http://www.w3.org/TR/html401/interact/forms.html#h-17.4
On that page, "hidden" is indeed one of the options on the line that
reads

type=text|passw ord|checkbox|ra dio|submit|rese t|file|hidden|i mage|button


Wow, that was major brain malfunction I just had. Not only did I miss
"hidden" from the spec whose url I cited, but I forgot that I use
type="hidden" regularly in my pages.
I'd be shocked and deeply upset if it were ever to be dropped!


As would I. It is indeed very useful. Apologies for my absentmindednes s.

--
Brian (remove "invalid" to email me)
Jul 23 '05 #7
On Fri, 3 Dec 2004, Christopher Benson-Manica wrote:
Can I make a <textarea> and an <input type="checkbox" > invisible?


Probably; but on one of my browsers it'll certainly do nothing.

Have you forgotten to set the context of what you're trying
to achieve by this? And how you propose to handle the situation
when it doesn't work?

Jul 23 '05 #8
Alan J. Flavell <fl*****@ph.gla .ac.uk> spoke thus:
Have you forgotten to set the context of what you're trying
to achieve by this? And how you propose to handle the situation
when it doesn't work?


The only browser of interest in this case is IE 6+, so what it does in
other browsers isn't important.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Jul 23 '05 #9
Christopher Benson-Manica wrote:
The only browser of interest in this case is IE 6+, so what it does
in other browsers isn't important.


Then your question is not terribly interesting to me. (Did you see the
"www" in the group name? It tends to attract people interested in
authoring the www, not authoring for a Windows system component.)

Bye.
--
Brian (remove "invalid" to email me)
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3307
by: Ahmad Noori | last post by:
I have a form and in the form, I have a drop down box. Based on what the user selects, i want to display different input boxes. Here is my drop down box: <td> <select name="reptype" onchange="checkVersion4()"> <option value=""></option> <option value="A">A:</option> <option value="B">B:</option> <option value="C">C:</option>
3
29675
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification says: "The 'visibility' property takes the value 'collapse' for row, row group, column, and column group elements. This value causes the entire row or column to be removed from the display, and the space normally taken up by the row or column to...
2
1953
by: Dave Hammond | last post by:
I'm not sure if this is technically a javascript question, but I'm coding in javascript, so I'll try here first. To overlay a section of a page I typically use an absolute positioned <div> and call insertAdjacentHTML. By raising the z-index higher than than the underlying elements this method works fine, except if there is a window'd element below it, such as a <select>. My understanding is that I need to use the visbility attribute to...
4
1592
by: jmensch | last post by:
I'm reasonably new to JavaScript and DHTML, so I'm sorry if this is an obvious mistake. The following snippet of code is intended to make the menu -- the absolute-positioned <div> section -- disappear when one mouses over the graphic, but instead it generates a "document. menu_admin has no properties" error in Firefox and does nothing in IE. Can someone tell me what it is that I'm doing wrong here?
4
25058
by: wasntme | last post by:
I want to toggle a <div in and out of view. My question, which of the below examples would best be supported. Or is there another approach, that would be better used..TIA.. ..A.. <a href="#" onclick="C1.style.visibility='visible';">open</a> <a href="#" onclick="C1.style.visibility='hidden'">close</a> ..B.. <a href="#" onclick="C1.style.display='block'">display</a>
3
1615
by: Dica | last post by:
i want to set up my aspx page with a hierarchical navigation system. first the user has to select to "-- Select An Action --", which could be either "Add Item" or "Edit Item". If the user selects "Edit Item", i show a list of items they can select. once selected, i show the input form, which has all the item details. conversely, if the user selects "Add Items", i skip showing the "Select Item" drop down and go straight to showing the item...
3
3313
by: dwilson | last post by:
Hi Folks, I am having a strange Javascript issue. I have a div that I show and hide by clicking on an image link, and all images within the div do not show up in IE. FireFox does not give me this problem. Also, under IE, when I expand the div and adjust the font size with <control + mouse wheel> the images show up. When I do not set the div's style.position at all in the javascript, this problem does not occur. I am making a tree,...
11
2619
by: -D- | last post by:
How can I turn the visibility of the xml control on or off? <%@ Control Language="c#" AutoEventWireup="false" Codebehind="TopNavBar.ascx.cs" Inherits="compass.user_controls.TopNavBar" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> <table cellSpacing="0" cellPadding="0" border="0"> <colgroup span="1" align="left" width="50%"> </colgroup> <colgroup span="1" align="right" width="50%"> </colgroup>
2
1851
by: Jamey Bon | last post by:
I am a C# newbie. I am having a tough time with several issues of scope and visibility. In short, why can't I see any of the elements of Form1 (the base form generated by the "Windows Application Project Wizard") from anywhere else in my project? For example, why can I not change the text of a TextBox control from Main() (which is, by default, in the Program class) even after I have set its visibility to public in Form1? Furthermore,...
0
8367
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8570
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2781
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.