Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Layers visible and hidden with variables 1

Status
Not open for further replies.

tomhughes

Vendor
Joined
Aug 8, 2001
Messages
233
Location
US
I am trying to make two layers visible and hidden using variables which are dependent upon the value in a Recordset.
The two variables are supposed to control whether a Flash layer is visible, or a Graphics layer is visible. I have declared the variables as FlashVar, and GifVar, and have declared them in VB, in the ASP part of the page. How can I get the Browser to recognize their values in the body of the page?
 
Hi

All you need to do is write the visibility by checking the variable value for the layer:

Code:
visibility: <%If Flashvar=&quot;show&quot; then response.write(&quot;visible&quot;) else response.write(&quot;hidden&quot;)%>

But an even more efficient way would be to set the value of your variables to the visibility you require (&quot;hidden&quot; or visible&quot;), then you could just do :

Code:
visibility: <%=flashvar%>

This is the html for your layer by the way.

It feels like a brief answer, so reply if you need more. Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top