Log in

View Full Version : "rollover" of image sets but within different elements



ItsMeOnly
08-14-2006, 09:09 PM
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?


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];
}
}
}

jscheuer1
08-15-2006, 03:18 AM
Definitely not HTML, haven't you been around here long enough now to find the right forum to post in?

ItsMeOnly
08-15-2006, 10:24 AM
Well, I found out shortly after posting that I posted in wrong section (wrong tab), I cannot delete it, and only moderators can move it- sorry, not _entirely_ my fault... :-D

HOWEVER: in the meanwhile I managed to evaluate and implement the script- it's working great! :)

jscheuer1
08-15-2006, 06:15 PM
You can delete a post, select edit, then delete but, there is a safeguard, you have to first also find and select the radio button that says 'delete this message'.

So, edit, find the radio button (usually a little circle thing), select it, then hit delete.

ItsMeOnly
08-15-2006, 07:08 PM
no, can't do :(, just tried that with unanswered post, no "delete this post" option for me.

jscheuer1
08-16-2006, 02:39 AM
Hmm, here is where it gets even a little trickier. The delete option expires after a certain amount of time. I don't know how long that is or if it varies depending upon one's 'title'. I think it is a day or two. I've almost never had cause to delete any old posts. I usually know right away if I should delete, and at the outside in a day. Once there was a situation where I had linked to another member's post that was old and that member even later saw that his original post referred and linked to copyright material that he had thought at the time was in the public domain. To make a long story short, ddadmin's help was required to clean all that up as both the other member's and my delete rights to the posts in question had expired.