Closed Thread Icon

Topic awaiting preservation: Preloading Pages that link to <a href="https://ozoneasylum.com/backlink?for=8926" title="Pages that link to Topic awaiting preservation: Preloading" rel="nofollow" >Topic awaiting preservation: Preloading\

 
Author Thread
amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 10-28-2003 14:18

If you preload an image called "myImage.gif", and then set it as "myimage.gif" when you use it, it has'nt been preloaded at all.
It seems that since it's a javascript-object, it's case-sensitive.
Has anyone else noticed this too??

(^-^)b

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-29-2003 02:46

Um, yes js variables and Image paths are case sensative.

What are you doing here? Do you have some code? this sounds hinky



.:[ Never resist a perfect moment ]:.

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 10-29-2003 15:10

Oh, I'm just a bit tired to come across the issue of preloading over and over again.

I have visited several sites using preloading, and more often than not I see that their preloadings have different spellings than the images they have tried to preload, and several times the issue have come up why it did'nt work, posted at forums like this one, and all sorts of exotic explanations have been offered, except the obvious one.


I guess what I'm trying to say is this: before posting anything relating to preloadings again, check your spelling first - as a general tip.

I'm tired of this question popping up over and over again.
- Can't this forum create a FAQ????
That way, some basic issues can be dealt with once and for all.




(^-^)b

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 10-29-2003 15:18

To clarify this, I'm meaning that this is something I see too often..

<script>
img=new Image()
img.src="myImage.gif";
</script>

<img src="myimage.gif" />

Almost every time I have been asked why the preloading does'nt work, this has been the case.
For some reason a lot of people assume that it wont matter how I spell the image-tag, just because it does'nt matter on a webpage.
That tag will load the image "myImage.gif" in any browser, but it has'nt been preloaded.



(^-^)b

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-29-2003 15:51

But, that's freaking obvious that the case is important.
And, the Asylum has a FAQ. The link is present in every pages below the [ post new topic ] [ post new reply ] buttons at the top of the page. The section about image preloading is in the :FAQ: How do I preload images with Javascript?. I don't know if it mentions the case sensitivity but, it's used in file systems since years so it should be evident for everyone that the case is important now.

Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 10-29-2003).]

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 10-29-2003 17:33

Look, all I know is that I come across it time and time again.
- But you are right - there's a very good FAQ here.
I dont know what clicked in my head... just forget it.



(^-^)b

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-29-2003 17:44

Alright, just to clarify some things.
The case diffrences in this script, mean nothing.

<script>
img=new Image()
img.src="myImage.gif";
</script>

<img src="myimage.gif" name="mYiMaGe"/>

Preloading does nothing for images, loaded via an img tag. Preloading is used when you want to display an image after the page loads. So in this example the original img is still going to be "myimage.gif", the preloaded image is going to be "myImage.gif" and unless you do something like:

document.images.mYiMaGe.src = img.src;

The two are not related.



.:[ Never resist a perfect moment ]:.

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 10-31-2003 05:26

It would be a shame to go through the trouble of making a nice shiny new Object and then ignore it. Objects feel so unwanted if they are not used....

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

« BackwardsOnwards »

Show Forum Drop Down Menu