I have a small function that simply swaps image A with image B. The problem
is that in some situations (i don't know why yet) when A and B are swapped,
they simply vanish. Here is the function (with a transition):
<script>
var pictemp=new Image();
function replacemain(id) {
if (document.all){
document.images .MainImage.styl e.filter="blend Trans(duration= 2)"
document.images .MainImage.filt ers.blendTrans. Apply()
document.images['Image_'+id].style.filter=" blendTrans(dura tion=2)"
document.images['Image_'+id].filters.blendT rans.Apply()
}
pictemp.src=doc ument.images.Ma inImage.src;
document.images .MainImage.src = document.images['Image_'+id].src;
document.images['Image_'+id].src=pictemp.sr c;
if (document.all){
document.images .MainImage.filt ers.blendTrans. Play()
document.images['Image_'+id].filters.blendT rans.Play()
}
}
</script>
is that in some situations (i don't know why yet) when A and B are swapped,
they simply vanish. Here is the function (with a transition):
<script>
var pictemp=new Image();
function replacemain(id) {
if (document.all){
document.images .MainImage.styl e.filter="blend Trans(duration= 2)"
document.images .MainImage.filt ers.blendTrans. Apply()
document.images['Image_'+id].style.filter=" blendTrans(dura tion=2)"
document.images['Image_'+id].filters.blendT rans.Apply()
}
pictemp.src=doc ument.images.Ma inImage.src;
document.images .MainImage.src = document.images['Image_'+id].src;
document.images['Image_'+id].src=pictemp.sr c;
if (document.all){
document.images .MainImage.filt ers.blendTrans. Play()
document.images['Image_'+id].filters.blendT rans.Play()
}
}
</script>
Comment