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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client side vbscript hide and show DIV tags 2

Status
Not open for further replies.

ironhide1975

Programmer
Feb 25, 2003
451
0
0
US
Hey I have a form that has several areas I want to show and hide bases on what button a person chooses. I want to do this in vbscript instead of javascript. Can anyone tell me how to do this?

Much appreciated.

 
You can use the visibility property.
I think "visible" is the value to show your div.
(I use javascript more often for this.)

Code:
<script language='vbscript'>
<!--
sub window_onLoad
	top.frame.divname.style.visibility= "hidden"
end sub
-->
</script>
 
There is also the CSS attribute [tt]display[/tt] which for a DIV is normally "block" but can be set to "none" to keep the DIV from being rendered at all. Unlike [tt].visibility = "hidden"[/tt] you can use [tt].display = "none"[/tt] to keep the DIV from taking up any space in the page as well as not having its content appear.

There are a few browser compatability issues with these CSS attributes, but if you are using VBScript you are most likely targeting IE 5+ anyway.

See: display Attribute | display Property
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top