On Oct 23, 10:36 am, Tuxedo <tux...@mailina tor.comwrote:
Yes:
function first_function (PARAMETER) {
preload_image = new Image(800,600);
preload_image.o nload = function () { photo_preloaded (PARAMETER); };
preload_image.s rc = 'images/photo.jpg';
}
--
Jorge.
How is it possible to pass a parameter via a function that runs upon onload
of an off-screen image? Like for example:
>
(...)
>
function first_function( PARAMETER){
preload_image = new Image(800,600);
preload_image.o nload = photo_preloaded (PARAMETER);
preload_image.s rc = 'images/photo.jpg';
>
}
>
function photo_preloaded (PARAMETER){
alert(PARAMETER )
>
}
of an off-screen image? Like for example:
>
(...)
>
function first_function( PARAMETER){
preload_image = new Image(800,600);
preload_image.o nload = photo_preloaded (PARAMETER);
preload_image.s rc = 'images/photo.jpg';
>
}
>
function photo_preloaded (PARAMETER){
alert(PARAMETER )
>
}
(...)
>
Is is possible to run the second function only if the image has been
preloaded, with the parameter? If so, how would this be constructed?
>
>
Is is possible to run the second function only if the image has been
preloaded, with the parameter? If so, how would this be constructed?
>
function first_function (PARAMETER) {
preload_image = new Image(800,600);
preload_image.o nload = function () { photo_preloaded (PARAMETER); };
preload_image.s rc = 'images/photo.jpg';
}
--
Jorge.
Comment