Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Setting Visibility for Label in form.


Message #1 by "sunny" <smonkus@r...> on Mon, 9 Sep 2002 06:39:11
Hi Sunny

Make sure your form name is formCustomerConnection and then try adding 
the property visible
visible between the double quotes like this 
document.all.VPNHOFNN.style.visibility="visible";

Phil


> Hi There,

> I'm trying to display or not display a label depending the input of
t> he user. Below is my sample code, but it keeps complainting the
o> bject not found. Please help. Thank you for your time.

> (1) This code is in my html.
<> div id="VPNHOFNN"><p align="right">If Other, please specify 
&> nbsp;&nbsp;</div></td>        

> (2) This code is in my .JS file.
	> if (formCustomerConnection.CPEType.value == "Other")
	> {				
	> 	// Set Visible
	> 	document.all.VPNHOFNN.style.visibility="";
	> }
	> else
	> {
	> 	// Set Invisible
	> 	document.all.VPNHOFNN.style.visibility="hidden";	
	> }	
c> heers
S> unny.

  Return to Index