Following my "window resizing" scripts, now here's another challenge:
I will attempt to achieve "window borders'" activation and "blur".
The basics are known to me, a preload script containing two sets of arrays- one for active and "blurrred" window.
the "activation/blur" script is also not a very big deal- an invoked loop that looks for id's according to given "window id" argument, and pulls in images from preloaded arrays.
However, the image elements id's are making me puke, because, as we know- they should be unique- so now the question is:
Is this ok?
Code:corners = new Array("t", "tr", "r", "br", "b", "bl", "l", "tl", "titlel", "title", "titler") active = new Array(); inactive = new Array(); for (var x=0; x < corners.lenght; x++) { active[x] = new Image; active[x].src = "/pictures/aborder_" + corners[x] + ".png"; inactive[x] = new Image; inactive[x].src = "/pictures/border_" + corners[x] + ".png"; } function chgBorder('windowID', 'state') { for (var x=0; x < corners.lenght; x++) { myID = windowID + "_" + corners[x]; if (corner[x] != "t" && corner[x] != "r" && corner[x] != "b" && corner[x] != "l" ) { document.getElementById(myID).src = (state == 'active') ? active[x] : inactive[x]; } else { document.getElementById(myID).style.backgroundImage = (state == 'active') ? active[x] : inactive[x]; } } }



Reply With Quote
, just tried that with unanswered post, no "delete this post" option for me.

Bookmarks