need to make a loop for a layer hide/show function.
i have designed a website containing about 150 layers that are 'visible' or 'hidden' by the click of a button.
my problem is...
...that i've designed the entire website...
...and now i realize that the html document is too big...
...and is a bit slow when navigating...
i haven't had much experience when it comes to loops...
...so i've ignored this idea until now...
...and now i'm stuck with the situation of having to add loops to reduce the size of the site...
can anyone tell me what the best way to loop the following function is?
Its hard to explain what server-side scripting can really do for you.
I try... if you have a lot of data don't put them into a flat file...use a database. Based on different cases you can call the data from the database without switching 150 layers.
i don't really have time at the moment to re-design the infrastucture of the site...
...all i'm trying to do for the time being...
...is reduce the size of the site with loops...
...and i'm just wondering if there is a way of making a loop out of this particular function...
...where i get stuck is...
...i make a while loop...
...using i=1 to start...
...then replace kw[1/2/3] with kw[i]...
...i'm not actually sure how to add the 'i'...
...should i put it in quotes like this: "...kw" +i+ "..."?
...i understand the logic of it at least...
...but i'm not sure what i should do with the (a,b,c) part of the function...
...how would the loop incorporate the 'if(a)' part of the function...
...when 'i++' is used to continue the loop...
...how would the if(a) then turn into 'if(b)'?
i'm not sure how clear i'm being about this...
...but the point is...
...i need to know if there is any way of turning this into a loop...
Bookmarks