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

Hide DropDown..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

How can I hide a certain object if I choose a certain value from a dropdownbox?

Something like..

Set oAll=self.document.all
if oAll.Item("Select1").Value="1" then
oAll.Item("From").Hidden
oAll.Item("Tom").Hidden
end if

What is the correct syntax?

/Kent J.
 
I assume you are in the onchange or other event handler for your <select> list. If your form is named
Code:
frmInput
you could use:
Code:
If Me.value = &quot;1&quot; Then 
  frmInput.From.style.visibility = &quot;hidden&quot;
  frmInput.Tom.style.visibility = &quot;hidden&quot;
End If
This of course assumes that From and Tom are input elements within your form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top