H-street
08-26-2004, 07:36 PM
Ok i am hoping someone can help me..
i have an image on a website that is loaded from the users selecting certain parameters.. some of these images may take a long time to load so what i wanted to do was have a Loading image appear while the image is loading to indicate that an action is being executed (user feedback)..
anyways i tried code that looks like this but it doesn't work
var loading_image = new Image(750,150);
load_image.src = "/images/loading_image.gif";
var user_image_in;
function load_image(user_image_in) {
document.images[user_image].src = load_image.src
var new_image = new Image(750,150);
new_image.src = user_image_in;
document.images[user_image].src = new_image.src
}
now when i execute that function the loading image never appears even though the user_image may take upto 30-40 seconds to load..
but if i put an alert("check") beween the load_image and the new_image the loading image will load and the new_image will load after i hit OK..
anyone have any ideas or help?
i have an image on a website that is loaded from the users selecting certain parameters.. some of these images may take a long time to load so what i wanted to do was have a Loading image appear while the image is loading to indicate that an action is being executed (user feedback)..
anyways i tried code that looks like this but it doesn't work
var loading_image = new Image(750,150);
load_image.src = "/images/loading_image.gif";
var user_image_in;
function load_image(user_image_in) {
document.images[user_image].src = load_image.src
var new_image = new Image(750,150);
new_image.src = user_image_in;
document.images[user_image].src = new_image.src
}
now when i execute that function the loading image never appears even though the user_image may take upto 30-40 seconds to load..
but if i put an alert("check") beween the load_image and the new_image the loading image will load and the new_image will load after i hit OK..
anyone have any ideas or help?