| | |
preloading image (white page between) problem
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hello again, Im using the code below in a child page (popup), the images
are called from the parent page. When the changer is running, the child page goes white between images. I realise this is happening because the Images are not cached (yet) on the users browser.
I tried preloading images with the 2nd code below in the childpage head
and in the parent page head and both. no joy, dosent seem to actually 'preload' the pics. (i also gave definitions by adding width & height attributes but no difference. Is there anyway to solve this problem?
preveiw (click yellow highlighted link 'Pre-view active topics' near top)
note: first image (green python) is the childpage body BG (css)
In previous Instance of the changer code, links were called from photobucket.com, at that point, the images were cacheing after loading (so after the full cycle 15 pics there was no white between), I though calling the pics from the same domain would be better but now it dosent cache at all.
notice pics are attachments in the parent page, is that why no cache?
http://herproom.5.forumer.com/index.php?
Have reverted back to offsite links for changer script and images are now cached after the full cycle (15 pics) Is there a way to stop the flicker?
are called from the parent page. When the changer is running, the child page goes white between images. I realise this is happening because the Images are not cached (yet) on the users browser.
I tried preloading images with the 2nd code below in the childpage head
and in the parent page head and both. no joy, dosent seem to actually 'preload' the pics. (i also gave definitions by adding width & height attributes but no difference. Is there anyway to solve this problem?
preveiw (click yellow highlighted link 'Pre-view active topics' near top)
note: first image (green python) is the childpage body BG (css)
In previous Instance of the changer code, links were called from photobucket.com, at that point, the images were cacheing after loading (so after the full cycle 15 pics there was no white between), I though calling the pics from the same domain would be better but now it dosent cache at all.
notice pics are attachments in the parent page, is that why no cache?
http://herproom.5.forumer.com/index.php?
[code language="javascript"]
<script LANGUAGE="JavaScript">
<!--
var BackgroundChangeIndex = 0;
var wistol = new Array
("http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9886","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9887","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9888","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9889","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9890","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9891","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9892","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9893","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9894","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9895","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9896","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9897","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9898","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9899","http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9900");
function SetBackgroundImage()
{
var BackgroundImage;
BackgroundChangeIndex++;
if (BackgroundChangeIndex >= wistol.length)
{
BackgroundChangeIndex = 0;
}
BackgroundImage = wistol[BackgroundChangeIndex]
document.body.style.cssText="background: url(" + BackgroundImage + ");" + "background-attachment: fixed; center; center;"
setTimeout("SetBackgroundImage()", 10000)
}
//-->
</script>
[/code] JavaScript / DHTML / AJAX Syntax (Toggle Plain Text) - <SCRIPT language="JavaScript">
- <!--
- if (document.images)
- {
- pic1= new Image();
- pic1.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9886";
- pic2= new Image();
- pic2.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9887";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9888";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9889";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9890";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9891";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9892";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9893";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9894";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9895";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9896";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9897";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9898";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9899";
- pic3= new Image();
- pic3.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9900";
- }
- //-->
- </SCRIPT>
Have reverted back to offsite links for changer script and images are now cached after the full cycle (15 pics) Is there a way to stop the flicker?
Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
W. C. Fields
> pic1.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9886";
AFICT, the src attribute requires an absolute image path. In other words, it requires an URL and not an URI.
From what I can see, you are trying to send a request to the server with some given parameters which would after required processing would return an image as a response. If yes, then no, this won't work. Something like
AFICT, the src attribute requires an absolute image path. In other words, it requires an URL and not an URI.
From what I can see, you are trying to send a request to the server with some given parameters which would after required processing would return an image as a response. If yes, then no, this won't work. Something like
pic1.src="http://herproom.5.forumer.com/images/image1.jpg would be a good thing to try out. :-) I don't accept change; I don't deserve to live.
![]() |
Similar Threads
- Hotmail Login Problem! (Web Browsers)
- Hotmail ONLY accessing page problem -- Only with one account (Web Browsers)
- Problem in loading new image (JSP)
- Download image from DB and view it... (C#)
- problem with background image repeat-y (HTML and CSS)
- about:blank Trusted Start Page problem (Viruses, Spyware and other Nasties)
- DSO Exploit + VX2/F problem along with brower home page problem (Viruses, Spyware and other Nasties)
- Problem viewing motion .gif and rollover... (Windows NT / 2000 / XP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: ClamShell Menu Not Working in Foxfire
- Next Thread: Javascript- On selection appear image..
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n






