chris_angell
07-02-2002, 12:31 PM
hello, i am trying to call new images from my js code, but the trouble I am having is ::: i want to add an array of values so i can call different images into different areas.. at the moment I have done it like this... just repeating the code
var preload = new Image();
preload.src = "../images/leftblock_bot.gif";
function GIFS() {
document['botleft'].src = preload.src;
}
var preload = new Image();
preload.src = ".../images/top_blockleft.gif";
function GIFS() {
document['mainleft'].src = preload.src;
}
but this is long and sloppy, is there an easier way to say i want this named id to call this image using more than one var ??
thank you chris
:(
var preload = new Image();
preload.src = "../images/leftblock_bot.gif";
function GIFS() {
document['botleft'].src = preload.src;
}
var preload = new Image();
preload.src = ".../images/top_blockleft.gif";
function GIFS() {
document['mainleft'].src = preload.src;
}
but this is long and sloppy, is there an easier way to say i want this named id to call this image using more than one var ??
thank you chris
:(