[Javascript] hidden check box element

Muchacho, Laurent (TWIi London) LMuchacho at twii.net
Fri Jan 4 08:58:14 CST 2002


Hi Tom 

I know this answer it's a bit late but just get back 
you right that will not work in ns4 if you want to make it work you will
need to put all the form in a div a change the visibility of that div 

there is a example 

Good luck Laurent

http://www.dansteinman.com/dynduo/examples/forms2.html


-----Original Message-----
From: Tom Wheeler [mailto:tom at wheelercreek.com]
Sent: 28 December 2001 16:02
To: Javascript at LaTech.edu
Subject: [Javascript] hidden check box element



This works in IE, but in Netscape I think the only way to do this is to 
enclose the form in a <DIV>, and then access its style properties.  If
anyone has other info I would like to know.

<SCRIPT Language="JavaScript">
function showElement(toggle) {
 if (toggle == 'on') document.theForm.theCheckBox.style.visibility =
'visible';
 if (toggle == 'off') document.theForm.theCheckBox.style.visibility =
'hidden';
}
</SCRIPT>
<FORM name="theForm">
<input type="checkbox"  style="visibility:hidden" name="theCheckBox">
Are you there?
<P>
<A HREF="javascript:showElement('on')">show checkbox</A>
<A HREF="javascript:showElement('off')">hide checkbox</A>
</FORM>



M. Amin wrote:
Dear All,

in my html file i set a check box hidden as <input type=checkbox
style=visibility:hidden >........
and i'd like to trigger its visibility property using java script or by
using any solving idea.

Any help will be appreciated,
Regards,
 M. Amin
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list