I want to create a function in javascript that will find all of those elements and reverse the value of .style.display (from none to block, and vice versa). I currently have a function that will set all elements that are from id="list_1" to id="list_100" but I don't want to limit it to 100 and I dont want it to freeze the browser for x amount of seconds during this call.
Any suggestions are welcome.
Last edited by phice on Tue Jun 28, 2005 2:39 am, edited 1 time in total.
how about just stopping when you found an element which doesn't exist?
(or keep a list of which elements does exist)
or you could give them all let's say tag="TNT" and just loop through the children of a container, and checking for that tag, however doesn't work if they are spread out.
If you know the name is list_x where x is an integer you should be able to just use a while loop. Example (my javascript is not 100% as at present I am think php but should give you a starting point).