Quote:
document.getElementById().src=""?
But this seems to show a second of the original image before replacing it with the queried new image...
|
That's the right way, but the question is: Why would you have something OTHER than the first image there in the first place? If it takes a second or two to figure out what you need to display, maybe you should instead show something completely different--a kind of "please wait" placeholder?--until you have all your content ready to display.
document.write is considered obsolete and is clearly not the preferred way to go. Among other things, you can *NOT* use document.write after a page is loaded (after the </body> and </html> tags have been processed by the browser). If you do so, you will WIPE OUT ALL PRIOR CONTENT of the page, including even the JavaScript code you use to do the document.write! So that means you MUST use document.write DURING the creation of the page. And if your filtering et al. takes several seconds to complete, that means that the browser will be showing *nothing* (or at least an incomplete page) until you complete the last processing and the last document.write.
So... Methinks you need to come up with a way to make your page look good for those few seconds it takes to do the processing.