/ Forside / Teknologi / Udvikling / HTML / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
HTML
#NavnPoint
molokyle 11184
Klaudi 5506
bentjuul 3377
severino 2040
smorch 1950
strarup 1525
natmaden 1396
scootergr.. 1320
e.c 1150
10  miritdk 1110
simple question for experts
Fra : Bart Noels


Dato : 11-02-02 23:40

Hi all

I've got a HTML page with several DIV's on them

Each DIV has the same name, but a different ID. Since the HTML page is
created dynamically i do not know
the ID's of the DIVs.

it's somthing like this

<HTML>
<DIV name="ITEMGROUP" ID="BIRDS">
table with contents
</DIV>
<DIV name="ITEMGROUP" ID="PLAINS">
table with contents
</DIV>
<DIV name="ITEMGROUP" ID="TOYS">
table with contents
</DIV>
</HTML>

I want to add a function wich makes all the DIVs invisible like

document.getelementbyid("BIRDS").style.visibility = "hidden"
document.getelementbyid("PLAINS").style.visibility = "hidden"
document.getelementbyid("TOYS").style.visibility = "hidden"

but because i do not know the id's in advance i can't do it that way.

i guess i've to use the document.all but i can't get it to work.

Please suggestions.

Thanks









 
 
Allan Vebel (12-02-2002)
Kommentar
Fra : Allan Vebel


Dato : 12-02-02 01:43

"Bart Noels" <Bart.noels1@pandora.be> skrev

> I want to add a function wich makes all the DIVs invisible like

Maybe http://www.vebel.dk/test/neo/noproblem.htm
could be a solusion?

Take a look at it.

--
Allan



Søg
Reklame
Statistik
Spørgsmål : 177557
Tips : 31968
Nyheder : 719565
Indlæg : 6408875
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste