Making SELECT-boxes invisible 
Author Message
 Making SELECT-boxes invisible

I need to be able to make all the SELECT-boxes on a web page invisible,
since I have to place a DIV-layer on top of them, but they shine through
the layer.

I have tried with:

sub hideAll
        document.getElementsByTagName("select").style.visibility = "hidden"
end sub

... but it doesn't work as I expected. I do not know how many SELECT-
boxes exist on the page, so the solution will have to be either a run-
through of a collection or just - as I tried above - application of a
method to the whole set of elements matching.

can you help me with this one ?

:)

The problem is illustrated at http://www.*-*-*.com/

--
Jesper Stocholm
http://
Exercise you right to free speach - use encryption to secure your
communication



Mon, 07 Feb 2005 19:32:01 GMT  
 Making SELECT-boxes invisible
getElementsByTagName returns a collection... So, try something like:

sub hideAll
  dim objEl
  dim objTags
  set objTags = document.getElementsByTagName("select")
  for each objEl in objTags
    objEl.style.visibility = "hidden"
  next
end sub

--


Quote:
> I need to be able to make all the SELECT-boxes on a web page invisible,
> since I have to place a DIV-layer on top of them, but they shine through
> the layer.

> I have tried with:

> sub hideAll
>     document.getElementsByTagName("select").style.visibility = "hidden"
> end sub

> ... but it doesn't work as I expected. I do not know how many SELECT-
> boxes exist on the page, so the solution will have to be either a run-
> through of a collection or just - as I tried above - application of a
> method to the whole set of elements matching.

> can you help me with this one ?

> :)

> The problem is illustrated at http://stocholm.dk/test/edit.aspx

> --
> Jesper Stocholm
> http://
> Exercise you right to free speach - use encryption to secure your
> communication



Mon, 07 Feb 2005 21:27:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. making an invisible select box visible

2. making <select> invisible

3. Making a value selected in a select box.

4. Problems making a automatic text box when selecting in a combo box

5. Making the Form invisible but making the controls seen

6. making select boxes and options in DOM

7. Making select boxes visible

8. Making a list box display only the selected item

9. Making items invisible on the fly

10. making things invisible?

11. Making a control invisible depending on calculated value in Access'97

12. Making calendar invisible

 

 
Powered by phpBB® Forum Software